[cups.general] Passing extra information from environmenttobackend?

Michael R Sweet msweet at apple.com
Fri Oct 19 11:14:40 PDT 2007


Kurt Pfeifle wrote:
> Michael R Sweet wrote:
>> Erik Forsberg wrote:
>>> ...
>>> If there were an environment variable for lpoptions being picked up by
>>> libcups, that would help, because this variable could be set
>>> differently in different sessions.
>>> As far as I can see, there is no such environment variable. Would a
>>> patch providing that functionality be accepted? 
>> No, we'd like to avoid setting print options from the environment -
>> we already have enough problems with the default printer getting
>> overridden...
> 
> What about a completely generic environment variable, which CUPS does
> not at all use, but just faithfully passes down its filtering chain
> through to the backend?

How is that any different?

CUPS has to use it at least enough to pass it on in an
attribute, and you can pass arbitrary attributes as options
already, which means that either the env var or the option
will get precedence, depending on the implementation.

Parsing multiple env vars is not really feasible since the
mechanisms for accessing the environment string array are not
well standardized and particularly are not thread safe.

If the purpose is to pass some sort of identification about
the user, you're much better off requiring authentication for
all print jobs and using the username.

-- 
______________________________________________________________________
Michael R Sweet                        Senior Printing System Engineer





More information about the cups mailing list