[cups] Searching recursively for backends and filtes inside ServerBin directory?

Michael Sweet msweet at apple.com
Wed Oct 15 11:55:49 PDT 2014


Mario,

While we might consider such a thing for filters, in general it is unnecessary since the path to "driver" filters can be specified in the PPD file.  All that CUPS requires is that such filters be installed by root without world write permissions...

As for backends, we really only want to use trusted programs as backends, and supporting a path-like mechanism could introduce security and long-term deployment issues since which backend is used could vary in hard-to-discover/manage ways.  Moreover, backends tend to support common interfaces/transports and are not generally included as part of a driver.


On Oct 15, 2014, at 2:37 PM, Mario Sanchez Prada <mario at endlessm.com> wrote:

> Hi,
> 
> I've been playing a bit lately with some customizations we need in our
> platforms related to how we integrate third-party printer drivers into
> the CUPS infrastructure, and I was wondering whether it would make
> sense to modify cups so it can search recursively for third party
> backends & filters under the ServerBin (e.g. /usr/lib/cups) directory.
> Pretty much as it already does when searching for PPD files insite
> /usr/share/ppd.
> 
> The reason why I was thinking of doing such a thing is because we
> would need to ship CUPS with ServerBin in the usual locations
> (/usr/lib/cups), but anything under that path will be read-only stuff
> once the system has booted, so any further installation of any other
> driver afterwards won't be able to install anything in that location.
> 
> So I thought that, if it was possible for CUPS to search recursively
> for filters and backends inside ServerBin, I guess I could implement
> some solution similar to what many printers manufacturers seem to
> follow for the PPD files: ship those files under some other
> directories and then symlinking to those directories from /usr/cups/.
> 
> In my mind, it could be perhaps something like this, for instance
> 
>  /usr/lib/cups/filters/third-party ->  /opt/cups-third-party/filters
>  /usr/lib/cups/backends/third-party  ->  /opt/cups-third-party/backends
> 
> (and we could include those symlinks as part of the base image
> populating /usr/lib/cups).
> 
> 
> I've checked the code and a quick grep shows that at least I'd need to
> change a few files under scheduler/ (cupsfilter.c, job.c,
> printers.c...) to achieve this, but I'm not aware yet of any side
> effect/implication that might have, so I think I could use some early
> advice here.
> 
> So, what do you think? Does this even make any sense, or is not
> possible/good idea for any reason?
> 
> Thanks in advance,
> Mario
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair



More information about the cups mailing list