]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Install root backends world-readable 21/head
authorMartin Pitt <mpitt@debian.org>
Tue, 9 Aug 2016 16:11:06 +0000 (18:11 +0200)
committerDidier Raboud <odyx@debian.org>
Wed, 4 Nov 2020 15:37:03 +0000 (16:37 +0100)
This is needed:
 - to comply with Debian Policy
 - because it is both nonsensical to not do so
 - it also breaks system checkers, bug reporting, etc

Bug: https://github.com/apple/cups/issues/2935
Bug-Debian: https://bugs.debian.org/410171
Patch-Name install-root-backends-world-readable.patch

backend/Makefile
scheduler/cups-deviced.c
scheduler/job.c

index 01900fb8b2ea2c6706649caa9fc46d1aed615383..8ddf6abbde53d9535cb09f1a4b8815da5a33925c 100644 (file)
@@ -13,7 +13,7 @@ include ../Makedefs
 # Object files...
 #
 
-# RBACKENDS are installed mode 0700 so cupsd will run them as root...
+# RBACKENDS are installed mode 0744 so cupsd will run them as root...
 #
 # UBACKENDS and ULBACKENDS are installed mode 0755 so cupsd will run them as
 # an unprivileged user...
@@ -118,7 +118,7 @@ install-exec:       $(INSTALLXPC)
        echo Installing backends in $(SERVERBIN)/backend
        $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
        for file in $(RBACKENDS); do \
-               $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
+               $(INSTALL_BIN) -m 744 $$file $(SERVERBIN)/backend; \
        done
        for file in $(UBACKENDS); do \
                $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
index 77703b98330bbf8f985871033c4dc3aa929d3b9a..14478fd990afece7781fbff3efeeaf966cd1edf7 100644 (file)
@@ -265,7 +265,7 @@ main(int  argc,                             /* I - Number of command-line args */
     * all others run as the unprivileged user...
     */
 
-    start_backend(dent->filename, !(dent->fileinfo.st_mode & (S_IWGRP | S_IRWXO)));
+    start_backend(dent->filename, !(dent->fileinfo.st_mode & (S_IWGRP | S_IWOTH | S_IXOTH)));
   }
 
   cupsDirClose(dir);
index 17b341834cbe5e52ba7608ea783d75b151b79e05..7f35a0e70cf56c0d86b50e72a2a14624615b8587 100644 (file)
@@ -1247,7 +1247,7 @@ cupsdContinueJob(cupsd_job_t *job)        /* I - Job */
       else if (stat(command, &backinfo))
        backroot = 0;
       else
-        backroot = !(backinfo.st_mode & (S_IWGRP | S_IRWXO));
+        backroot = !(backinfo.st_mode & (S_IWGRP | S_IWOTH | S_IXOTH));
 
       argv[0] = job->printer->sanitized_device_uri;