svn commit: samba r3848 - in branches/SAMBA_3_0/source/smbd: .

vlendec at samba.org vlendec at samba.org
Thu Nov 18 15:13:59 GMT 2004


Author: vlendec
Date: 2004-11-18 15:13:58 +0000 (Thu, 18 Nov 2004)
New Revision: 3848

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3848

Log:
Fix for bug 2057. Only partially applied the patch, the second part seems not
necessary.

I'm using gcc 3.4.1, this does not detect the possibly uninitialized
variable. Does anybody know how to get 3.4.1 to warn me?

Volker

Modified:
   branches/SAMBA_3_0/source/smbd/lanman.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/lanman.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/lanman.c	2004-11-18 13:30:00 UTC (rev 3847)
+++ branches/SAMBA_3_0/source/smbd/lanman.c	2004-11-18 15:13:58 UTC (rev 3848)
@@ -2146,6 +2146,12 @@
 		goto out;
 	}
 
+	snum = lp_servicenumber( sharename);
+	if (snum == -1) {
+		errcode = NERR_DestNotFound;
+		goto out;
+	}
+
 	errcode = NERR_notsupported;
 	
 	switch (function) {
@@ -2971,6 +2977,7 @@
   if(!rap_to_pjobid(SVAL(p,0), sharename, &jobid))
     return False;
 
+  snum = lp_servicenumber( sharename);
   if (snum < 0 || !VALID_SNUM(snum)) return(False);
 
   count = print_queue_status(snum,&queue,&status);



More information about the samba-cvs mailing list