diff options
author | Didier Raboud <odyx@debian.org> | 2014-10-22 13:41:07 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2014-10-22 13:41:07 +0200 |
commit | f57471022524a9207d5b50ff5aa0669d7115efc7 (patch) | |
tree | 30e6e37f3e2dffa3ff9f9916559304b45a68bb07 | |
parent | 683683a15c116b8dd4d4e7ad25d7e8010811e606 (diff) | |
download | cups-f57471022524a9207d5b50ff5aa0669d7115efc7.tar.gz |
Add upstream patch to not let cupsGetPPD* return a symlink if it was not readable by the user
This should help with #764253
STR: #4500
Git-Dch: Full
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/str4500-cupsGetPPD3-Only-use-symlink-if-file-is-readable-STR.patch | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series index 139402b8..37f68781 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,6 +3,7 @@ str4396-make-scheduler-return-completed-jobs-in-correct-order.patch str2913-limit-Get-Jobs-replies-to-500-jobs.patch str4461-restore-access-to-logfiles.patch str4475-fix-the-spinner-imager-on-restart.patch +str4500-cupsGetPPD3-Only-use-symlink-if-file-is-readable-STR.patch # patches sent upstream pwg-raster-attributes.patch diff --git a/debian/patches/str4500-cupsGetPPD3-Only-use-symlink-if-file-is-readable-STR.patch b/debian/patches/str4500-cupsGetPPD3-Only-use-symlink-if-file-is-readable-STR.patch new file mode 100644 index 00000000..acf39d39 --- /dev/null +++ b/debian/patches/str4500-cupsGetPPD3-Only-use-symlink-if-file-is-readable-STR.patch @@ -0,0 +1,19 @@ +Description: cupsGetPPD* would return a symlink to the PPD in /etc/cups/ppd even if it was not readable by the user +Bug-Upstream: https://cups.org/str.php?L4500 +Author: Michael Sweet <msweet@apple.com> +Last-Updated: 2014-10-20 +--- a/cups/util.c ++++ b/cups/util.c +@@ -955,10 +955,10 @@ + + snprintf(ppdname, sizeof(ppdname), "%s/ppd/%s.ppd", cg->cups_serverroot, + name); +- if (!stat(ppdname, &ppdinfo)) ++ if (!stat(ppdname, &ppdinfo) && !access(ppdname, R_OK)) + { + /* +- * OK, the file exists, use it! ++ * OK, the file exists and is readable, use it! + */ + + if (buffer[0]) |