]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/usb-darwin.c
Merge changes from CUPS 1.5svn-r9675.
[thirdparty/cups.git] / backend / usb-darwin.c
index a41dfbf380cd3999dbf92ea9a75abc9a166f71fe..0733891b1ba9917c4f74a9a0c97acc7f4c879b00 100644 (file)
@@ -1,7 +1,7 @@
 /*
 * "$Id: usb-darwin.c 7953 2008-09-17 01:43:19Z mike $"
 *
-* Copyright 2005-2010 Apple Inc. All rights reserved.
+* Copyright 2005-2011 Apple Inc. All rights reserved.
 *
 * IMPORTANT:  This Apple software is supplied to you by Apple Computer,
 * Inc. ("Apple") in consideration of your agreement to the following
@@ -1435,9 +1435,15 @@ static kern_return_t load_classdriver(CFStringRef            driverPath,
                    "permissions (0%o/uid=%d/gid=%d).\n", bundlestr,
                    bundleinfo.st_mode, (int)bundleinfo.st_uid,
                    (int)bundleinfo.st_gid);
-    fputs("STATE: +cups-insecure-filter-warning\n", stderr);
-
-    if (bundleinfo.st_uid || (bundleinfo.st_mode & S_IWOTH))
+    if (bundleinfo.st_uid ||
+       (bundleinfo.st_gid && bundleinfo.st_gid != 80 &&
+        (bundleinfo.st_mode & S_IWGRP)) ||
+       (bundleinfo.st_mode & (S_ISUID | S_IWOTH)))
+      fputs("STATE: +cups-insecure-filter-warning\n", stderr);
+
+    if (bundleinfo.st_uid ||
+        (bundleinfo.st_gid && bundleinfo.st_gid != 80 &&
+        (bundleinfo.st_mode & S_IWOTH)))
     {
       if (driverPath)
         return (load_classdriver(NULL, intf, printerDriver));