[Samba] Re: error with cupsaddsmb - adddriver
dkrnic at lycos.com
Wed May 21 12:36:51 GMT 2003
>>> When executing "cupsaddsmb -a -v", I get an error:
>>> NT_STATUS_UNSUCCESSFULL, when attemping to execute
>>I assume you are talking about samba 2.2.8a. There
>>is a bug #82, a NULL pointer being dereferenced in
>>a function called strlen_w, called by rpcstr_pull,
>>both in lib/util_unistr.c. Read all about it in
Had you read through this bug correspondence you would
have noticed that there are actually 2 bugs, the one I
described above is the one that affects "enumdriver 3"
subcommand of rpcclient command.
The other bug, actually responsible for failing
"adddriver" subcommand is also caused by a NULL
pointer dereferencing in another function called
vasprintf, invoked by sys_adminlog from within the
source file rpc_server/srv_spoolss_nt.c, lines 6659
through 6672. Since this function is inessential for
the printing service - it logs in a file who, when,
and why installed which printer driver - the quoted
lines beginning with "/* BEGIN_ADMIN_LOG */" and
ending with "/* END_ADMIN_LOG */" may simply be
commented out until a new samba version without this
bug comes out.
>>You may have to apply the fix manually and rebuild
>>samba in order to use the printing services.>
>I work with RH 9.0, and with the samba version
>delivered with this distribution.
>I checked, and it is samba 2.2.7a - 7.9.0
To my knowledge the bug was there already in 2.2.6,
though one could somehow hack a new driver in. But
the best way to check if we're talking about the
same pet is to include the following directive in
the general section of your smb.conf:
panic action = /usr/bin/X11/xterm \
-display <your-display-host-here>:0 \
-e gdb /proc/%d/exe %d
restart samba server and execute cupsaddsm again. A
debugging window will pop up when the fault occurs
and then you can type "backtrace" in that window to
unwind call stack from the point of failure back to
samba main(). At level #6 it should list vasprintf.
>Is the fix, you have written available for this
>version too ?
Unless RedHat already fixed these bugs in 9.0 and
your problem is quite another defect, yes. As a
matter of fact, rebuilding samba turned out to be
very easy once one applies a little sweat to it.
You basically collect all the prerequisite files
described in the respective distro samba.spec under
/usr/src/packages/SOURCES, fire up
"rpm -bb samba.spec" from there and after it is done
install the new rpms from /usr/src/packages/RPMS/i386
with "rpm -Uhv *".
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
More information about the samba