Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 72669

Summary: Samba 3.0.8 breaks printing from all Windows 98 & Windows 95 clients
Product: Gentoo Linux Reporter: Bruce Collins <bruce>
Component: Current packagesAssignee: Gentoo's SAMBA Team <samba>
Status: RESOLVED DUPLICATE    
Severity: critical    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Bruce Collins 2004-11-27 12:24:02 UTC
Any attempt to print from a Window 98 or Windows 95 client causes smbd to panic.  Windows XP is can still print.

Nov 27 14:57:06 shockwave smbd[9778]: [2004/11/27 14:57:06, 0] printing/printing_db.c:get_print_db_byname(40)
Nov 27 14:57:06 shockwave smbd[9778]:   PANIC: assert failed at printing/printing_db.c(40)
Nov 27 14:57:06 shockwave smbd[9778]: [2004/11/27 14:57:06, 0] lib/util.c:smb_panic2(1403)
Nov 27 14:57:06 shockwave smbd[9778]:   PANIC: assert failed
Nov 27 14:57:06 shockwave smbd[9778]: [2004/11/27 14:57:06, 0] lib/util.c:smb_panic2(1411)
Nov 27 14:57:06 shockwave smbd[9778]:   BACKTRACE: 1 stack frames:
Nov 27 14:57:06 shockwave smbd[9778]:    #0 /usr/sbin/smbd(smb_panic2+0x127) [0x81714d4]
Nov 27 14:57:06 shockwave smbd[9778]:


Reproducible: Always
Steps to Reproduce:
1. Print any document from a Win95 or Win98 clietn
2. Windows reports a printer error


Actual Results:  
smbd crashes 


Serious googling revealed this patch.  This seems to work on all our Samba 
servers 
=================================================================== 
--- smbd/lanman.c       (revision 3681) 
+++ smbd/lanman.c       (working copy) 
@@ -2267,6 +2267,12 @@ 
                return False; 
        *rparam_len = 4; 
        *rparam = REALLOC(*rparam,*rparam_len); 
+ 
+       if ( (snum = lp_servicenumber(sharename)) == -1 ) { 
+               DEBUG(0,("api_PrintJobInfo: unable to get service number from 
sharename [%s]\n", 
+                       sharename)); 
+               return False; 
+       } 
    
        *rdata_len = 0; 
         
 
--
Comment 1 Christian Andreetta (RETIRED) gentoo-dev 2004-11-28 08:19:45 UTC
already fixed in 3.0.8-r1 and 3.0.9

*** This bug has been marked as a duplicate of 71223 ***