[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Thu Sep 9 16:30:12 MDT 2010


The branch, master has been updated
       via  26ea51c s3-spoolss: allow a short printername w/o servername.
      from  718fd39 Fox missing SMB_MALLOC return checks noticed by "Andreas Moroder <andreas.moroder at gmx.net>".

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 26ea51c7ab59f54f0b88f1367a0982404b9be18b
Author: Günther Deschner <gd at samba.org>
Date:   Thu Sep 2 13:19:02 2010 +0200

    s3-spoolss: allow a short printername w/o servername.
    
    Verified with RPC-SPOOLSS-PRINTSERVER-enumprinters_old test.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source3/rpc_server/srv_spoolss_nt.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 1ff78dd..8978971 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -438,13 +438,8 @@ static bool set_printer_hnd_printertype(Printer_entry *Printer, const char *hand
 {
 	DEBUG(3,("Setting printer type=%s\n", handlename));
 
-	if ( strlen(handlename) < 3 ) {
-		DEBUGADD(4,("A print server must have at least 1 char ! %s\n", handlename));
-		return false;
-	}
-
 	/* it's a print server */
-	if (*handlename=='\\' && *(handlename+1)=='\\' && !strchr_m(handlename+2, '\\')) {
+	if (handlename && *handlename=='\\' && *(handlename+1)=='\\' && !strchr_m(handlename+2, '\\')) {
 		DEBUGADD(4,("Printer is a print server\n"));
 		Printer->printer_type = SPLHND_SERVER;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list