]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
cupsGetPPD* would return a symlink to the PPD in /etc/cups/ppd even if it was
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 20 Oct 2014 21:41:29 +0000 (21:41 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 20 Oct 2014 21:41:29 +0000 (21:41 +0000)
not readable by the user (STR #4500)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12218 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.0.txt
cups/util.c

index a2cb4ae1221c3dbefa4f5cf3d98f81890f4c960c..17455f62008384384bb8076638ff55b09e3021cf 100644 (file)
@@ -6,6 +6,8 @@ CHANGES IN CUPS V2.0.1
        - Security: SSLv3 is now disabled by default to protect against the
          POODLE attack (STR #4476)
        - Printer sharing did not work when systemd was being used (STR #4497)
+       - cupsGetPPD* would return a symlink to the PPD in /etc/cups/ppd even if
+         it was not readable by the user (STR #4500)
        - Fixed a crash in ippAttributeString (<rdar://problem/17903871>)
        - RPMs did not build (STR #4490)
 
index 8c340efc79fb5cb01e3d41d9e3daeff6edd49d51..ac43bb4149378aa6e17a3837269c3b24efb7347e 100644 (file)
@@ -846,10 +846,10 @@ cupsGetPPD3(http_t     *http,             /* I  - HTTP connection or @code CUPS_HTTP_DEFAUL
 
     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])