[cups] CUPS 2.2.x drops interface scripts - How to create filtered queues without PPD

Till Kamppeter till.kamppeter at gmail.com
Wed Jun 15 19:45:29 PDT 2016


Mike, thanks for your help on this topic.

On 06/15/2016 12:00 AM, Michael Sweet wrote:
>
> You don't, and can't.  There is no way to safely support interface scripts, and they don't work like regular print queues anyways (on OS X they won't even show up in the Print dialog because there is no PPD), so interface scripts are gone for good.
>
> What you *can* do in 2.2 (and before) is use a PPD file to point to an interface script (which acts as the printer/PPD filter) that was previously installed locally by the root user and has the correct permissions (owned by root, no world or group write permissions) for us to minimally trust the script.  That has the happy side effect of exposing common options for media, etc. to regular applications that otherwise would be unable to use the queue...
>
> (I fully realize we are passing the security bug to the OS guys, but it seems safer than allowing arbitrary code to be uploaded through cupsd as an interface script that we run directly...)
>
>> - Or should cups-browsed always generate PPD files, using certain
>>   default values for capability info which it is not able to obtain
>>   from the printer?
>
> This would also work.
>

Yes, this I will do. I will remove sys5ippprinter from cups-filters and 
let cups-browsed always create a PPD file. For that I will modify the 
PPD generator code (which I have copied from CUPS 2.1.x) to not fail if 
it gets insufficient information from the printer, but instead, fill in 
the blanks with reasonable default values, so that the generator always 
provides a usable PPD file. An appropriate cupsFilter2 line in the PPD 
will make sure that the printer gets the data in the correct language.

This way we will always have the best compromise between a 
printer-model-specific PPD and a "Generic XXX Printer" PPD.

This also assures that all print dialogs which are around currently show 
a useful set of options for the printer.

    Till




More information about the cups mailing list