]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/printers.c
Merge changes from CUPS 1.5svn-r8849.
[thirdparty/cups.git] / scheduler / printers.c
index 60028a722c9aeba3eb072b7d9993593141a6827f..b12a5498e40905b081ce8cf41547a54c0be901d0 100644 (file)
@@ -3567,11 +3567,12 @@ add_printer_filter(
     if (!RunUser)
     {
      /*
-      * Only use filters that are owned by root and do not have world write
-      * permissions.
+      * Only use filters that are owned by root and do not have group or world
+      * write permissions.
       */
 
-      if (fileinfo.st_uid || (fileinfo.st_mode & (S_ISUID | S_IWOTH)) != 0)
+      if (fileinfo.st_uid ||
+          (fileinfo.st_mode & (S_ISUID | S_IWGRP | S_IWOTH)) != 0)
       {
        if (fileinfo.st_uid)
          snprintf(p->state_message, sizeof(p->state_message),
@@ -3598,7 +3599,7 @@ add_printer_filter(
 
        if (!stat(filename, &fileinfo) &&
            (fileinfo.st_uid ||
-            (fileinfo.st_mode & (S_ISUID | S_IWOTH)) != 0))
+            (fileinfo.st_mode & (S_ISUID | S_IWGRP | S_IWOTH)) != 0))
        {
          if (fileinfo.st_uid)
            snprintf(p->state_message, sizeof(p->state_message),