summaryrefslogtreecommitdiff
path: root/debian/patches/rootbackends-worldreadable.patch
blob: 8ea94cd7fea1a5b0249db9484b8ecbe5642a3267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Description: Install root backends world-readable, to comply to Debian Policy and because it is both nonsensical to to not do so, and also breaks system checkers, bug reporting, etc.
Author: Martin Pitt <mpitt@debian.org>
Bug: http://www.cups.org/str.php?L2935
Bug-Debian: http://bugs.debian.org/410171

--- a/backend/Makefile
+++ b/backend/Makefile
@@ -124,7 +124,7 @@
 	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; \
--- a/scheduler/cups-deviced.c
+++ b/scheduler/cups-deviced.c
@@ -282,7 +282,7 @@
     */
 
     start_backend(dent->filename,
-                  !(dent->fileinfo.st_mode & (S_IRWXG | S_IRWXO)));
+                  !(dent->fileinfo.st_mode & (S_IWGRP | S_IXGRP | S_IWOTH | S_IXOTH)));
   }
 
   cupsDirClose(dir);
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -1207,7 +1207,7 @@
       else if (stat(command, &backinfo))
 	backroot = 0;
       else
-        backroot = !(backinfo.st_mode & (S_IRWXG | S_IRWXO));
+        backroot = !(backinfo.st_mode & (S_IWGRP | S_IXGRP | S_IWOTH | S_IXOTH));
 
       argv[0] = job->printer->sanitized_device_uri;