Point and Print issues.
sambauser at katehok.ac93.org
Sat Oct 30 20:25:23 GMT 2004
I finally got some time to try Point and Print and I've got 2 issues
which I think may need an attention.
Issue #1. When accessing my printer I've noticed that Samba slows down
and I suspect it is busy printing the following error message in smbd log:
[2004/10/30 15:07:45, 0] lib/util_str.c:safe_strcpy_fn(600)
ERROR: string overflow by 1 (32 - 31) in safe_strcpy [\\server\EPSON
Stylus C 84 Series]
As far as I understand it is printed from safe_strcpy_fn call in
printing/nt_printing.c:get_a_printer_2() function which attempts to copy
driver's name into 'char adevice[MAXDEVICENAME];' string and then it is
copied into info.devmode->devicename (which is declared as fstring).
Now, I'm confused - where the limitation 32 bytes (MAXDEVICENAME) comes
from and is it really necessary?
And second, I assume that Jerry's delta introducing 'force printername'
will not help to fix this problem since driver name is taken directly
from tdb database. Is it correct?
Issue #2. I don't like to use 'root' for Samba administrator so to look
like a very smart person I put 'admin users = domadmin' and 'invalid
users = root' in my smb.conf. When I've started to play with Point and
Print I've added 'printer admin = domadmin' too. Looks good, right? :)
Unfortunately, when you login as a user in 'admin users' list you are
forced into uid=0 and this makes the folloing statement in
rpc_server/srv_spoolss_nt.c:_spoolss_open_printer_ex() function return
False (due to 'invalid users = root'):
user_ok(uidtoname(user.uid), snum, user.groups, user.ngroups)
Using a different user for 'printer admin' than the one specified as
'admin users' forced me to change owner on files in [print$] share as
well as ntdrivers.tdb and ntprinters.tdb to the very same user. Now I
can have 'invalid users = root' but I'm forced to use one user for
Domain administration and another for printer administration.
So, I wonder what was the correct solution to this problem? The one I've
used? Removing 'invalid users = root' from smb.conf? Creating a pactch
to change uidtoname(user.uid) to a different way of finding out who the
current user is? Or is there something else as well?
More information about the samba-technical