The Samba-Bugzilla – Bug 2333
"printer name" is not honored in printing.c
Last modified: 2005-08-24 10:23:57 UTC
It seems like in some new versions of samba, the printer name attribute from a
printer share is no longer honored in printing.c while updating the printer
queue and the printer state. The function seems to assume that the printer name
is the same as the servicename.
do you mean the 'printer name' smb.conf option? That is only
for setting the %p printing variable. Can you give some more
details of you problem including the lines in the code you are
referring to ?
Also, I would recommend looking (and testing) 3.0.11 as it
has some critical printing bug fixes incorporated in it.
yes i mean the "printer name" option. we have several printer shares on our
server who point to a single cups queue. Job submitting works fine. But you
can't see the queued jobs on this cups printer. In the log.smbd file there are a
lot of errors from the cups printing backend, that the staus of the queued jobs
couldnt be retrieved. "Unable to get jobs for <url>"
This happens because the url used to retrieve the data is as follows
"ipp://localhost/printers/<printerqueue>", and <printerqueue> is not replaced by
the printer name configured in smb.conf, but by the sharename that is unknown to
cups. All other functions of the interface printif get snum as an argument, and
the cups backend replaces this with the "printer name" from smb.conf. Only
queue_get gets the sharename as argument, and in printing.c the sharename is not
replaced by the printername if one was defined in smb.conf.
Created attachment 964 [details]
patch against 3.0.11 to opverload the lpq command to pass in the printername to cups_queue_get()
nice diagnosis. Please test this patch. Note that it
sets the default lpq command for cups printers to be '%p'
and we use the lpq_command variable to pass in the
printer name. This is basically how we do it for other
printing backends such as lprng.
Thanks for the bug report. It was very helpful.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.