summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2014-08-12 22:18:06 +0200
committerDidier Raboud <odyx@debian.org>2014-08-14 08:51:41 +0200
commit59521ff07802808441d10276cc84d5f401975878 (patch)
treeacca8f574e6f873b60e6690d7bf023877020409a /debian
parent0c79838f99ca5553f14fce1d7d8f82115aeefa7e (diff)
downloadcups-59521ff07802808441d10276cc84d5f401975878.tar.gz
Add patch from RedHat to restore access to logfiles from the webinterface, regression from the fix for STR: #4455
Closes: #757964
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/cups-restore-access-to-logfiles.patch29
-rw-r--r--debian/patches/cupsd-write-systemd-Port.patch10
-rw-r--r--debian/patches/series1
3 files changed, 35 insertions, 5 deletions
diff --git a/debian/patches/cups-restore-access-to-logfiles.patch b/debian/patches/cups-restore-access-to-logfiles.patch
new file mode 100644
index 00000000..0b73e398
--- /dev/null
+++ b/debian/patches/cups-restore-access-to-logfiles.patch
@@ -0,0 +1,29 @@
+Description: Restore access to cupsd.conf and logfiles, fix regression
+ introduced by STR: #4455
+Author: Tim Waugh <twaugh@redhat.com>
+Bug-Upstream: https://www.cups.org/str.php?L4461
+Bug-Debian: https://bugs.debian.org/757964
+Last-Update: 2014-08-12
+--- a/scheduler/client.c
++++ b/scheduler/client.c
+@@ -3360,8 +3360,18 @@
+
+ if (!status && !(filestats->st_mode & S_IROTH))
+ {
+- cupsdLogMessage(CUPSD_LOG_INFO, "[Client %d] Files/directories such as \"%s\" must be world-readable.", con->http.fd, filename);
+- return (NULL);
++ /*
++ * The exception is for cupsd.conf and log files for
++ * authenticated access.
++ */
++
++ if ((strncmp(con->uri, "/admin/conf/cupsd.conf", 22) &&
++ strncmp(con->uri, "/admin/log/", 11)) ||
++ cupsdIsAuthorized(con, NULL) != HTTP_OK)
++ {
++ cupsdLogMessage(CUPSD_LOG_INFO, "[Client %d] Files/directories such as \"%s\" must be world-readable.", con->http.fd, filename);
++ return (NULL);
++ }
+ }
+
+ /*
diff --git a/debian/patches/cupsd-write-systemd-Port.patch b/debian/patches/cupsd-write-systemd-Port.patch
index b7d34b0e..05d73395 100644
--- a/debian/patches/cupsd-write-systemd-Port.patch
+++ b/debian/patches/cupsd-write-systemd-Port.patch
@@ -146,7 +146,7 @@ Last-Update: 2014-03-05
*/
cupsdLogMessage(CUPSD_LOG_ERROR,
-@@ -3497,6 +3497,7 @@
+@@ -3507,6 +3507,7 @@
*out; /* Output file */
char buffer[16384]; /* Copy buffer */
ssize_t bytes; /* Number of bytes */
@@ -154,7 +154,7 @@ Last-Update: 2014-03-05
/*
-@@ -3511,17 +3512,30 @@
+@@ -3521,17 +3522,30 @@
}
/*
@@ -187,7 +187,7 @@ Last-Update: 2014-03-05
/*
* Copy from the request to the new config file...
-@@ -3532,12 +3546,12 @@
+@@ -3542,12 +3556,12 @@
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"Unable to copy to config file \"%s\": %s",
@@ -202,7 +202,7 @@ Last-Update: 2014-03-05
cupsdUnlinkOrRemoveFile(filename);
return (HTTP_SERVER_ERROR);
-@@ -3549,7 +3563,7 @@
+@@ -3559,7 +3573,7 @@
cupsFileClose(in);
@@ -211,7 +211,7 @@ Last-Update: 2014-03-05
return (HTTP_SERVER_ERROR);
/*
-@@ -3563,8 +3577,15 @@
+@@ -3573,8 +3587,15 @@
* Set the NeedReload flag...
*/
diff --git a/debian/patches/series b/debian/patches/series
index 13032319..37d6fe58 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,6 +9,7 @@ rootbackends-worldreadable.patch
fixes-for-jobs-with-multiple-files-and-multiple-formats.patch
cupsd-idleexittimeout.patch
cups-no-gcrypt.patch
+cups-restore-access-to-logfiles.patch
# patches which should go upstream
color-management-extension.patch