summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-11-18 15:13:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:20 -0500
commit54024f58261c64099b46a964a92b96e3e48bd1fe (patch)
treeb5654234f66ba0e83bbf7a1b62960a8d2e78afb4
parent84b2403241d2ce289d410bc45bd58ba09ccdc9fd (diff)
downloadsamba-54024f58261c64099b46a964a92b96e3e48bd1fe.tar.gz
samba-54024f58261c64099b46a964a92b96e3e48bd1fe.tar.bz2
samba-54024f58261c64099b46a964a92b96e3e48bd1fe.zip
r3848: 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 (This used to be commit 8b6f8f93a0f30be0184e6044a499c1ef8f7b247e)
-rw-r--r--source3/smbd/lanman.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index aeea9de9ca..5f4c0cec52 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -2146,6 +2146,12 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param
goto out;
}
+ snum = lp_servicenumber( sharename);
+ if (snum == -1) {
+ errcode = NERR_DestNotFound;
+ goto out;
+ }
+
errcode = NERR_notsupported;
switch (function) {
@@ -2971,6 +2977,7 @@ static BOOL api_WPrintJobGetInfo(connection_struct *conn,uint16 vuid, char *para
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);