diff options
author | Alexey D | 2018-04-17 08:24:59 +0300 |
---|---|---|
committer | Alexey D | 2018-04-17 08:24:59 +0300 |
commit | 077cce4ce21428b3c751ee11a3fe3d1859a6b133 (patch) | |
tree | 56fa57880dcd7c856aab25f37dbbe26f8dba9348 | |
parent | 1086293384316c1b59738f6d96384f8ff5da2179 (diff) | |
download | aur-077cce4ce21428b3c751ee11a3fe3d1859a6b133.tar.gz |
web interface fix from upstream package
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | auth-workaround-for-certain-web-browsers.patch | 59 |
3 files changed, 71 insertions, 4 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Sat Mar 31 06:38:40 UTC 2018 +# Tue Apr 17 05:23:37 UTC 2018 pkgbase = cups-nosystemd pkgdesc = The CUPS Printing System - daemon package pkgver = 2.2.7 - pkgrel = 1 + pkgrel = 2 url = https://www.cups.org/ install = cups-nosystemd.install arch = i686 @@ -52,6 +52,7 @@ pkgbase = cups-nosystemd source = cups-no-export-ssllibs.patch source = cups-no-gzip-man.patch source = cups-1.6.2-statedir.patch + source = auth-workaround-for-certain-web-browsers.patch sha256sums = 3c4b637b737077565ccdfbd5f61785d03f49461ae736fcc2c0ffaf41d2c6ea6a sha256sums = 87cd833e7c07a36298341e35d5ce0534ce68fdf76ce3e9eda697e5455b963d1b sha256sums = d87fa0f0b5ec677aae34668f260333db17ce303aa1a752cba5f8e72623d9acf9 @@ -59,6 +60,7 @@ pkgbase = cups-nosystemd sha256sums = ff3eb0782af0405f5dafe89e04b1b4ea7a49afc5496860d724343bd04f375832 sha256sums = b8fc2e3bc603495f0278410350ea8f0161d9d83719feb64f573b63430cb4800b sha256sums = 23349c96f2f7aeb7d48e3bcd35a969f5d5ac8f55a032b0cfaa0a03d7e37ea9af + sha256sums = e5ad0e967c2ae9a9780211acb41980e4aa203df1dacff49d14d75a6ab6c8b8ed pkgname = cups-nosystemd @@ -3,7 +3,7 @@ pkgname="cups-nosystemd" pkgver=2.2.7 -pkgrel=1 +pkgrel=2 pkgdesc="The CUPS Printing System - daemon package" arch=('i686' 'x86_64') license=('GPL') @@ -36,6 +36,8 @@ source=(https://github.com/apple/cups/releases/download/v${pkgver}/cups-${pkgver cups-no-export-ssllibs.patch cups-no-gzip-man.patch cups-1.6.2-statedir.patch + # bugfixes + auth-workaround-for-certain-web-browsers.patch ) sha256sums=('3c4b637b737077565ccdfbd5f61785d03f49461ae736fcc2c0ffaf41d2c6ea6a' '87cd833e7c07a36298341e35d5ce0534ce68fdf76ce3e9eda697e5455b963d1b' @@ -43,7 +45,8 @@ sha256sums=('3c4b637b737077565ccdfbd5f61785d03f49461ae736fcc2c0ffaf41d2c6ea6a' '57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5' 'ff3eb0782af0405f5dafe89e04b1b4ea7a49afc5496860d724343bd04f375832' 'b8fc2e3bc603495f0278410350ea8f0161d9d83719feb64f573b63430cb4800b' - '23349c96f2f7aeb7d48e3bcd35a969f5d5ac8f55a032b0cfaa0a03d7e37ea9af') + '23349c96f2f7aeb7d48e3bcd35a969f5d5ac8f55a032b0cfaa0a03d7e37ea9af' + 'e5ad0e967c2ae9a9780211acb41980e4aa203df1dacff49d14d75a6ab6c8b8ed') prepare() { cd cups-${pkgver} @@ -58,6 +61,9 @@ prepare() { # move /var/run -> /run for pid file patch -Np1 -i "$srcdir"/cups-1.6.2-statedir.patch + # bugfixes + patch -Np1 -i "$srcdir"/auth-workaround-for-certain-web-browsers.patch + # set MaxLogSize to 0 to prevent using cups internal log rotation sed -i -e '5i\ ' conf/cupsd.conf.in sed -i -e '6i# Disable cups internal logging - use logrotate instead' conf/cupsd.conf.in diff --git a/auth-workaround-for-certain-web-browsers.patch b/auth-workaround-for-certain-web-browsers.patch new file mode 100644 index 00000000000..9b5af9eb4cd --- /dev/null +++ b/auth-workaround-for-certain-web-browsers.patch @@ -0,0 +1,59 @@ +From 4feb1fe2e5bb9f418f51f5f517f70b451159baa2 Mon Sep 17 00:00:00 2001 +From: Michael R Sweet <michael.r.sweet@gmail.com> +Date: Mon, 16 Apr 2018 17:16:31 -0400 +Subject: [PATCH] - Added a workaround for certain web browsers that do not + support multiple authentication schemes in a single response header (Issue + #5289) + +--- + scheduler/client.c | 22 +++++++++++++++++----- + scheduler/client.h | 8 +++++--- + 2 files changed, 22 insertions(+), 8 deletions(-) + +diff --git a/scheduler/client.c b/scheduler/client.c +index f388499dc..95c34877d 100644 +--- a/scheduler/client.c ++++ b/scheduler/client.c +@@ -813,6 +814,18 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ + + if (status == HTTP_STATUS_OK) + { ++ /* ++ * Record whether the client is a web browser. "Mozilla" was the original ++ * and it seems that every web browser in existence now uses that as the ++ * prefix with additional information identifying *which* browser. ++ * ++ * Chrome (at least) has problems with multiple WWW-Authenticate values in ++ * a single header, so we only report Basic or Negotiate to web browsers and ++ * leave the multiple choices to the native CUPS client... ++ */ ++ ++ con->is_browser = !strncmp(httpGetField(con->http, HTTP_FIELD_USER_AGENT), "Mozilla/", 8); ++ + if (httpGetField(con->http, HTTP_FIELD_ACCEPT_LANGUAGE)[0]) + { + /* +@@ -2103,8 +2116,7 @@ cupsdSendHeader( + strlcpy(auth_str, "Negotiate", sizeof(auth_str)); + } + +- if (con->best && auth_type != CUPSD_AUTH_NEGOTIATE && +- !_cups_strcasecmp(httpGetHostname(con->http, NULL, 0), "localhost")) ++ if (con->best && auth_type != CUPSD_AUTH_NEGOTIATE && !con->is_browser && !_cups_strcasecmp(httpGetHostname(con->http, NULL, 0), "localhost")) + { + /* + * Add a "trc" (try root certification) parameter for local non-Kerberos +diff --git a/scheduler/client.h b/scheduler/client.h +index aaca8279a..fc7af5400 100644 +--- a/scheduler/client.h ++++ b/scheduler/client.h +@@ -26,6 +27,7 @@ struct cupsd_client_s + struct timeval start; /* Request start time */ + http_state_t operation; /* Request operation */ + off_t bytes; /* Bytes transferred for this request */ ++ int is_browser; /* Is the client a web browser? */ + int type; /* AuthType for username */ + char username[HTTP_MAX_VALUE], + /* Username from Authorization: line */ +-- +2.17.0 |