Limiting list of printers seen by user?

Michael Sweet mike at easysw.com
Fri Oct 28 06:30:26 PDT 2005


Erik Forsberg wrote:
> ...
> This raises the question - where in the lib is the
> requesting-user-name added? Must the application provide it, or will
> libcups find out for itself? Source code inspection seems to suggest
> the latter. Odd.

If the app does an IPP request of its own, then it must add the
requesting-user-name attribute.  If it uses cupsGetDests() or
cupsGetDests2(), then CUPS will do it for the app...

> Hmm.. on the other hand, inspecting the packets sent, and the source
> code of cups/util.c, it doesn't seem like the CUPS_GET_PRINTERS call
> sends any requesting-user when I run kprinter, or a very simple test
> program. Adding code to cupsGetPrinters that adds the
> requestion-user-name seems to solve the problem for my simple test
> program and openoffice, but not for kprinter. I've filed STR 1335 with
> a patch that corrects this.

cupsGetPrinters() is deprecated, and has been since CUPS 1.1 was
released.  cupsGetDests() and the newer cupsGetDests2() are the
recommended functions to use.

> Another observation is that 1.2svn-r4810 seems to duplicate printer
> definitions in printers.conf sometimes. Is this a known problem, or
> should I try to track it down? 

We had some issues with the new cupsArray*() functions a few weeks
back, but there should not be any problems now.  If you can come up
with a reproduction recipe, file a STR and we'll fix it.

Thanks!

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com




More information about the cups mailing list