Author: Lars Mueller Subject: Ensure to initialize snum Bugzilla: bugzilla.Samba.org #2057 --- samba-3.0.8/source/smbd/lanman.c +++ samba-3.0.8/source/smbd/lanman.c 2004-11-08 18:05:42 @@ -2143,6 +2143,12 @@ goto out; } + snum = lp_servicenumber( sharename); + if (snum == -1) { + errcode = NERR_DestNotFound; + goto out; + } + errcode = NERR_notsupported; switch (function) { @@ -2280,6 +2286,12 @@ goto out; } + snum = lp_servicenumber( sharename); + if (snum == -1) { + errcode = NERR_DestNotFound; + goto out; + } + errcode = NERR_notsupported; switch (function) { @@ -2962,6 +2974,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);