Prev · NextSTR #3092: Add support for printer list filtering

Duplicate Bugs:STR #3112: Limit long list of printers
Status:4 - Pending
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:CUPS API
Summary:Add support for printer list filtering
Version: -feature
Created By:stgraber
Assigned To:mike
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails


Trouble Report Files:

Name/Time/Date/Filename/Size
stgraber: 05:38 Feb 06, 2009
 
printer-filtering.patch (5k)
 

Trouble Report Dialog:

Name/Time/Date/Text
stgraber: 05:38 Feb 06, 2009
 
When used with LTSP or similar terminal systems, all the users are using a few application servers. In a typical setup, these then connect to a central cups server for printing.

In some of our setups, we may have over 700 printers on the cups server and as the application server are not linked to a physical location, we can't filter the printers that the user will see.

The proposal is to add a PRINTER_LIST variable that will contain all the printers that the user can see, when set the user will only see the content of PRINTER (the default printer) and PRINTER_LIST (comma separated list). When set to empty, he won't see any printer and when not set it'll fallback to the usual behavior.

We wrote a patch doing exactly what's described above for cups 1.3.9 and generated the .deb packages using it for our customers but would really appreciate to get it include in CUPS to make it available to everyone and avoid having to maintain it separately.

We patched ippReadIO to do it, making a separate function that gets the ipp stream and filter the printers. We did it here as it's what we identified as the one function used by all libraries and softwares using libcups.

If you have any question or suggestion, they are very welcome.

PS: Patch author is Julien Desfossez working with me at Revolution Linux.

 
mike: 08:33 Feb 06, 2009
 
Um yeah, you can pretty much guarantee that we will never release this kind of hack as part of CUPS.

The CUPS-Get-Printers operation already supports several attributes for filtering, so *if* we add support for this (via client.conf file most likely) it will get integrated into what cupsGetDests returns and not hack ippReadIO (which is the *wrong* thing to do, as I mentioned to the author when he first came to me with his patch...)

FWIW, you can also already filter the list of printers by setting the allowed users for each printer - this depends on having consistent usernames across your network, of course, but it already sounds like you have a managed client environment.