summaryrefslogtreecommitdiff
path: root/debian/patches/0003-Install-root-backends-world-readable.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0003-Install-root-backends-world-readable.patch')
-rw-r--r--debian/patches/0003-Install-root-backends-world-readable.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/debian/patches/0003-Install-root-backends-world-readable.patch b/debian/patches/0003-Install-root-backends-world-readable.patch
new file mode 100644
index 000000000..9acfef10e
--- /dev/null
+++ b/debian/patches/0003-Install-root-backends-world-readable.patch
@@ -0,0 +1,65 @@
+From: Martin Pitt <mpitt@debian.org>
+Date: Tue, 9 Aug 2016 18:11:06 +0200
+Subject: 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
+---
+ backend/Makefile | 4 ++--
+ scheduler/cups-deviced.c | 2 +-
+ scheduler/job.c | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/backend/Makefile b/backend/Makefile
+index e3ce49b..b734458 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 77703b9..14478fd 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 2cfb1b0..515fc8b 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;
+