Jonathan Knight
2004-Nov-10 15:54 UTC
[Samba] Samba 3.0.8 breaks all printing from Windows 98
We have small panic here as we've just put samba 3.0.8 up to fix the DoS attack but all printing from Windows 98 has now broken. Printing from Windows XP is still working fine. We're running on Fedora 2 using LPRng. Everything was working fine under 3.0.7 and no changes to the OS or the config files was made. Samba was upgraded to 3.0.8 using the configure line from the 3.0.7 build. The log.smbd file contains: [2004/11/10 15:08:11, 1] smbd/service.c:make_connection_snum(648) rm4pc68-klab1 (160.5.110.156) signed connect to service lilab1 initially as user XXXX (uid=XXXX, gid=901) (pid 8669) [2004/11/10 15:08:11, 0] printing/printing_db.c:get_print_db_byname(40) PANIC: assert failed at printing/printing_db.c(40) [2004/11/10 15:08:11, 0] lib/util.c:smb_panic2(1403) PANIC: assert failed [2004/11/10 15:08:11, 0] lib/util.c:smb_panic2(1411) BACKTRACE: 16 stack frames: #0 /usr/local/samba/sbin/smbd(smb_panic2+0x1f5) [0x82076be] #1 /usr/local/samba/sbin/smbd(smb_panic+0x19) [0x82074c7] #2 /usr/local/samba/sbin/smbd(get_print_db_byname+0x9f) [0x823ac1f] #3 /usr/local/samba/sbin/smbd [0x8226292] #4 /usr/local/samba/sbin/smbd(print_job_set_name+0x27) [0x8228f64] #5 /usr/local/samba/sbin/smbd [0x8095554] #6 /usr/local/samba/sbin/smbd(api_reply+0x391) [0x80992bb] #7 /usr/local/samba/sbin/smbd [0x808d8f6] #8 /usr/local/samba/sbin/smbd(reply_trans+0xde2) [0x808e8e2] #9 /usr/local/samba/sbin/smbd [0x80e372d] #10 /usr/local/samba/sbin/smbd [0x80e3803] #11 /usr/local/samba/sbin/smbd(process_smb+0x215) [0x80e3b9a] #12 /usr/local/samba/sbin/smbd(smbd_process+0x195) [0x80e49b9] #13 /usr/local/samba/sbin/smbd(main+0x881) [0x827395b] #14 /lib/tls/libc.so.6(__libc_start_main+0xe4) [0x42015704] #15 /usr/local/samba/sbin/smbd [0x80750d1] A quick check reveals that printing.c has undergone a fairly major change to the API with many functions changing from using a sharename to being sent a service number which then has to be converted into a name for get_print_db_byname. The assert that fails is a check to make sure that the printer name is not NULL. Obviously we're dead in the water here so any help would be appreciated. ______ jonathan@cs.keele.ac.uk Jonathan Knight, / Department of Computer Science / _ __ Telephone: +44 1782 583437 University of Keele, Keele, (_/ (_) / / Fax : +44 1782 713082 Staffordshire. ST5 5BG. U.K.
Gerald (Jerry) Carter
2004-Nov-11 18:05 UTC
[Samba] Samba 3.0.8 breaks all printing from Windows 98
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jonathan Knight wrote: | | We have small panic here as we've just put samba 3.0.8 | up to fix the DoS attack but all printing from Windows 98 | has now broken. Printing from Windows XP is still working fine. Reproduced it. Try this patch. cheers, jerry - --------------------------------------------------------------------- Alleviating the pain of Windows(tm) ------- http://www.samba.org GnuPG Key ----- http://www.plainjoe.org/gpg_public.asc "If we're adding to the noise, turn off this song"--Switchfoot (2003) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBk6PcIR7qMdg1EfYRAs1dAJ9pdRpLQHrS6I+Ag1ANUtCn0JHyEQCfQuQI CYX/Sdt0bhT9lx7SbKKkefQ=kZ8M -----END PGP SIGNATURE----- -------------- next part -------------- Index: smbd/lanman.c ==================================================================--- 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;