[cups-devel] [MOD] STR #4703: PPD files in /etc/cups/ppd/ are sometimes not world-readable

Till Kamppeter noreply at cups.org
Thu Aug 27 20:25:36 PDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Depending on whether the scheduler gets an IPP request for adding or
modifying a print queue with a PPD file attached or with a printer model
URI (from "lpinfo -m" output) the resulting PPD in /etc/cups/ppd/ is
world-readable or not, and it seems that world-readable is the desired way.

Also the print dialog of the Chromium browser (Linux) hangs when the PPD of
the selected printer is not world-readable.

If the IPP request has the PPD attached, the scheduler copies it to
/etc/cups/ppd/ and explicitly sets the permissions to 0644
(scheduler/ipp.c, line 2651), so I assume that this is intended behavior.
Ownerships are root.root in this case (probably UID and GID of the cupsd
process).

If the IPP request has no attached PPD but only a model URI, the
copy_model() function of scheduler/ipp.c is used which creates a temporary
file (not world-readable) through which the PPD gets into /etc/cups/ppd/
and as nowhere permissions are set explicitly, the file ends up not
world-readable which is probably not intended. Ownerships are also root.lp
in this case.

I have a patch attached which fixes it by explicitly setting permissions
and ownerships appropriately for the case that the IPP request has a model
URI and no attached PPD file.

Link: https://www.cups.org/str.php?L4703
Version: 2.1-current
Attachment: https://www.cups.org/strfiles.php/3553/scheduler-create-ppd-correct-permissions.patch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJV39SvAAoJENujp6sI12IjrUoP/3PZx7GOjY3FDli22OCzdcjI
6WfrEfRYbfxTvKsuGbAlLqHR/sbEDYc0kvl8EOBZSfyIm+72WV8E6wDwT+Bo1mJq
95GVvHZdmfGWgLg4TZHgCoqVYgkxGemXQ0YA397Zy63ctJ1dH/CMBNkPNz7vjMDG
Vu811qxaFlSSU6Zz1fiu3Z0n18Gr152s5exbGdHewV2zAbj15KCNbbp4baKDckbY
YJzoYsTbKBQAaCzBRdXH1XjBrkUcQ4IG9O2t24n6LdspBXjC3Wyf8gAyKhgkSYIj
e5FIjzq1AvGxKPOA7L7gQnCWR40+gI9wExlcI7s1gsveWgCPyqTK6uk13FNYZBCC
3Oi0xIXzyE7MSab5sGOwtnSqNoAHmBJS4ujD70O/muj/0mL/MrTOnNCldmIB0Bkt
chmbSo9OmHdrWIsaiXxPNuwmPn85mDdnR5t1Q8i18Zamff2OXvfxxTNbnN0lpkeO
0jwW90Z/7rnFV1YPKX3llVysYoVfg+fLcY2QP8mGh988uxz9/KkJvUMSnhvA0h9e
1BWUlqJVFDeKQm6DsVAB6Mtzut3AH6ttUPu8Z5uN1t1sWBvomS13f9jN1MRnKQCX
ivJbzTf6DKn9mZ5VUTOSEMWcSfKawuBmhJ8jXHBlcnyjCOWpYRBaoOjfnfL94XGA
RzSXYTsDRotY6bkLvBfj
=thdD
-----END PGP SIGNATURE-----




More information about the cups mailing list