]> git.ipfire.org Git - thirdparty/cups-filters.git/commit
libcupsfilters: Allow filter without path in filterExternalCUPS()
authorTill Kamppeter <till.kamppeter@gmail.com>
Mon, 18 Oct 2021 20:33:46 +0000 (22:33 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Mon, 18 Oct 2021 20:33:46 +0000 (22:33 +0200)
commit3d0b543936627fd3150fa68eed4df82afa985170
tree07e8717902eb392d72c3ee5bd360db1d072c68a8
parentacafde03068579dc77c38ed2a863ae1a03da1b7f
libcupsfilters: Allow filter without path in filterExternalCUPS()

The filterExternalCUPS() function now also works if the filter (or
backend) is specified without absolute path. In this case the
CUPS_SERVERBIN environment variable (does not matter whether it was
set in the actual environment or in the parameters of
filterExternalCUPS()) is used to locate the filter or backend, using
the /filter or /backend subdirectory of the directory specified by
CUPS_SERVERBIN.

In addition, this directory is also added to the beginning of PATH, as
CUPS does, so that filters/backends can find auxiliary programs (or
other filters if they are a wrapper) in the same directory where they
themselves are located.
cupsfilters/filter.c