How to subject "raw" queues to CUPS "operation policies"

Kurt Pfeifle kurt.pfeifle at infotec.com
Thu Apr 5 13:42:06 PDT 2007


Today I had to solve a little problem for a customer who uses Samba
3.0.24 with a CUPS 1.2.9 print server running about 100 print queues.

The users are authenticated via Samba+Winbind. We have defined a few
custom "operation policies" that allow certain groups of users to
execute certain administrative functions (job cancelling+reprinting,
printer modifications, adding+deleting printers via the web interface),
and to restrict overall access to some printers for only some people.

Most of these queues are working with the "CUPS PostScript Driver for
Windows 6.0" very smoothly.

However, for *some* of the queues the clients need to use the native
printer drivers for Windows, in order to be able to execute some of
the features (like "secure printing" for their human resources
department: users send their job, and walk up to the device which
starts printing only after keying in their personal password. The
process is using a proprietary, binary, encrypted header sent ahead of
the actual PostScript, and there get this feature with the CUPS driver).

Now the problem for these queues was that there was no way to assign
any of the custom operation policies to those "raw" queues via the
web interface (having the administrative users vi-edit the printers.conf  was out of scope).

The solution was to assign all those raw queues a minimal PPD. This PPD does nothing useful at all -- but to make it possible to open the web interface for "Set Printer Options" and allow assigning a non-default operation policy to the queue. To make raw printing happen for certain MIME types some appropriate "*cupsFilter" lines have been added. (NOTE,
if you use this PPD, you may want to remove some of these lines.)

This PPD passes the "cupstestppd" test.


---------------------- snip --------------------------------------

*PPD-Adobe:        "4.3"
*%
*% rawprint.ppd
*%
*% (c) Kurt Pfeifle <kurt.pfeifle at infotec.com>, April 5th 2007
*%     (Use freely as you like)
*%
*% This PPD's only real purpose in life is to create "raw" CUPS
*% queues that have a PPD -- a PPD that does nothing useful at
*% all. This is the only way to allow raw CUPS queues that can
*% be used by Windows clients with client-side print drivers
*% installed and at the same time allow CUPS v1.2+ "operation
*% policy" rules be applied to these queues.
*%
*% Delete or comment out the "*cupsFilter" lines below that are
*% not useful for you. This PPD makes all queues using it send
*% all named MIME types to the print device. It is your respon-
*% sibility to make sure the device can handle what gets thrown
*% at it when using this PPD. (Otherwise, this is the minimal
*% set of statements required to let it pass the "cupstestppd"
*% test.
*%

*FormatVersion:    "4.3"
*FileVersion:      "0.1"
*LanguageVersion:  English
*LanguageEncoding: ISOLatin1
*PCFileName:       "dummyraw.PPD"
*Manufacturer:     "Dummy4Raw"
*Product:          "(Raw CUPS Printing)"
*cupsFilter:       "application/vnd.cups-postscript 0 -"
*cupsFilter:       "application/postscript          0 -"
*cupsFilter:       "application/vnd.hp-HPGL         0 -"
*cupsFilter:       "application/octet-stream        0 -"
*cupsFilter:       "image/tiff                      0 -"
*ModelName:        "Raw CUPS Printing with Policies"
*ShortNickName:    "Raw CUPS Printing"
*NickName:         "Raw CUPS v1.x Printing (with CUPS Operation Policies)"
*PSVersion:        "(9999.999) 99999"

*OpenUI *PageSize:      PickOne
*OrderDependency:       1 AnySetup *PageSize
*DefaultPageSize:       Dummy
*PageSize Dummy:        ""
*CloseUI: *PageSize

*OpenUI *PageRegion:    PickOne
*OrderDependency:       2 AnySetup *PageRegion
*DefaultPageRegion:     Dummy
*PageRegion Dummy:      ""
*CloseUI: *PageRegion

*DefaultPaperDimension: Dummy
*PaperDimension Dummy:  "14400 14400"

*DefaultImageableArea:  Dummy
*ImageableArea Dummy:   "0 0 14400 14400"

---------------------- snap --------------------------------------


Cheers,
Kurt

--
Kurt Pfeifle
System & Network Printing Consultant -- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH - A RICOH Company ........ Stuttgart/Germany





More information about the cups mailing list