summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <mpitt@debian.org>2016-08-09 18:11:06 +0200
committerDidier Raboud <odyx@debian.org>2019-09-02 09:14:42 +0200
commitf93b70c7756e851d9ef7529117c2703173cd0c8f (patch)
tree4f4ab181968d0fefbaddc73ad55e4ed5739085cb
parenta808377009e8710a3e72c08219db4bf744b335a2 (diff)
Install root backends world-readable
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: http://www.cups.org/str.php?L2935 Bug-Debian: http://bugs.debian.org/410171 Gbp-Pq: Name 0003-Install-root-backends-world-readable.patch
-rw-r--r--backend/Makefile4
-rw-r--r--scheduler/cups-deviced.c2
-rw-r--r--scheduler/job.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/backend/Makefile b/backend/Makefile
index e3ce49be6..b73445857 100644
--- a/backend/Makefile
+++ b/backend/Makefile
@@ -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 \
- $(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
+ $(LIBTOOL) $(INSTALL_BIN) -m 744 $$file $(SERVERBIN)/backend; \
done
for file in $(UBACKENDS); do \
$(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
diff --git a/scheduler/cups-deviced.c b/scheduler/cups-deviced.c
index 77703b983..14478fd99 100644
--- a/scheduler/cups-deviced.c
+++ b/scheduler/cups-deviced.c
@@ -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);
diff --git a/scheduler/job.c b/scheduler/job.c
index 2cfb1b03d..515fc8b5e 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -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;