diff options
author | Didier Raboud <odyx@debian.org> | 2018-06-08 15:16:19 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2018-06-08 15:16:20 +0200 |
commit | 5f9ade5fa9c666c808f870340c9fc99c21e96a07 (patch) | |
tree | 19c22d65c4e396d4a4b76120f7a88c9c46b971a1 | |
parent | 96ffe0c39483c68e56bb51b99e985f50062b55b6 (diff) | |
parent | 3bf223a412fdb06943400735e7a133f3dbaad017 (diff) |
merge patched-debian/experimental into debian/experimental
29 files changed, 448 insertions, 134 deletions
diff --git a/cups/ipp.c b/cups/ipp.c index df752df54..c65790e2c 100644 --- a/cups/ipp.c +++ b/cups/ipp.c @@ -1,11 +1,10 @@ /* * Internet Printing Protocol functions for CUPS. * - * Copyright © 2007-2018 by Apple Inc. - * Copyright © 1997-2007 by Easy Software Products, all rights reserved. + * Copyright 2007-2017 by Apple Inc. + * Copyright 1997-2007 by Easy Software Products, all rights reserved. * - * Licensed under Apache License v2.0. See the file "LICENSE" for more - * information. + * Licensed under Apache License v2.0. See the file "LICENSE" for more information. */ /* @@ -5141,16 +5140,9 @@ ippValidateAttribute( } else if (*ptr & 0x80) break; - else if ((*ptr < ' ' && *ptr != '\n' && *ptr != '\r' && *ptr != '\t') || *ptr == 0x7f) - break; } - if (*ptr < ' ' || *ptr == 0x7f) - { - ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text); - return (0); - } - else if (*ptr) + if (*ptr) { ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text); return (0); @@ -5199,16 +5191,9 @@ ippValidateAttribute( } else if (*ptr & 0x80) break; - else if (*ptr < ' ' || *ptr == 0x7f) - break; } - if (*ptr < ' ' || *ptr == 0x7f) - { - ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text); - return (0); - } - else if (*ptr) + if (*ptr) { ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text); return (0); diff --git a/cups/testhttp.c b/cups/testhttp.c index bc77b0236..65d862def 100644 --- a/cups/testhttp.c +++ b/cups/testhttp.c @@ -1,11 +1,10 @@ /* * HTTP test program for CUPS. * - * Copyright © 2007-2018 by Apple Inc. - * Copyright © 1997-2006 by Easy Software Products. + * Copyright 2007-2014 by Apple Inc. + * Copyright 1997-2006 by Easy Software Products. * - * Licensed under Apache License v2.0. See the file "LICENSE" for more - * information. + * Licensed under Apache License v2.0. See the file "LICENSE" for more information. */ /* @@ -181,9 +180,6 @@ static uri_test_t uri_tests[] = /* URI test data */ HTTP_URI_CODING_MOST }, /* Bad resource */ - { HTTP_URI_STATUS_BAD_RESOURCE, "mailto:\r\nbla", - "mailto", "", "", "", 0, 0, - HTTP_URI_CODING_MOST }, { HTTP_URI_STATUS_BAD_RESOURCE, "http://server/index.html%", "http", "", "server", "", 80, 0, HTTP_URI_CODING_MOST }, diff --git a/debian/.git-dpm b/debian/.git-dpm index 03961099d..6547343b1 100644 --- a/debian/.git-dpm +++ b/debian/.git-dpm @@ -1,6 +1,6 @@ # see git-dpm(1) from git-dpm package -fa3e162dcbc513f2be320ac2ec7646ae93a6a83d -fa3e162dcbc513f2be320ac2ec7646ae93a6a83d +3bf223a412fdb06943400735e7a133f3dbaad017 +3bf223a412fdb06943400735e7a133f3dbaad017 464f939ece3aa9ca73931a325a4698834c25251d 464f939ece3aa9ca73931a325a4698834c25251d cups_2.3~b5.orig.tar.gz diff --git a/debian/patches/0016-Revert-Mirror-validation-changes-from-2.2-branch.patch b/debian/patches/0016-Revert-Mirror-validation-changes-from-2.2-branch.patch new file mode 100644 index 000000000..a16a08dc2 --- /dev/null +++ b/debian/patches/0016-Revert-Mirror-validation-changes-from-2.2-branch.patch @@ -0,0 +1,318 @@ +From 58a0b0902e9df38a768bc84a2eb6f97882c6f319 Mon Sep 17 00:00:00 2001 +From: Didier Raboud <odyx@debian.org> +Date: Fri, 8 Jun 2018 15:10:26 +0200 +Subject: Revert "Mirror validation changes from 2.2 branch." + +This reverts commit 4cadd6202fbcfc6bcb18c7bada4c40af4e8d736b. + +Fixes FTBFS on 2.2.8+, see https://github.com/apple/cups/issues/5322 +--- + cups/ipp.c | 25 ++------ + cups/testhttp.c | 10 +-- + scheduler/ipp.c | 164 ++++++++++++++++++++++++++---------------------- + 3 files changed, 97 insertions(+), 102 deletions(-) + +diff --git a/cups/ipp.c b/cups/ipp.c +index 714c2e522..179764104 100644 +--- a/cups/ipp.c ++++ b/cups/ipp.c +@@ -1,11 +1,10 @@ + /* + * Internet Printing Protocol functions for CUPS. + * +- * Copyright © 2007-2018 by Apple Inc. +- * Copyright © 1997-2007 by Easy Software Products, all rights reserved. ++ * Copyright 2007-2017 by Apple Inc. ++ * Copyright 1997-2007 by Easy Software Products, all rights reserved. + * +- * Licensed under Apache License v2.0. See the file "LICENSE" for more +- * information. ++ * Licensed under Apache License v2.0. See the file "LICENSE" for more information. + */ + + /* +@@ -5025,16 +5024,9 @@ ippValidateAttribute( + } + else if (*ptr & 0x80) + break; +- else if ((*ptr < ' ' && *ptr != '\n' && *ptr != '\r' && *ptr != '\t') || *ptr == 0x7f) +- break; + } + +- if (*ptr < ' ' || *ptr == 0x7f) +- { +- ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text); +- return (0); +- } +- else if (*ptr) ++ if (*ptr) + { + ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text); + return (0); +@@ -5083,16 +5075,9 @@ ippValidateAttribute( + } + else if (*ptr & 0x80) + break; +- else if (*ptr < ' ' || *ptr == 0x7f) +- break; + } + +- if (*ptr < ' ' || *ptr == 0x7f) +- { +- ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text); +- return (0); +- } +- else if (*ptr) ++ if (*ptr) + { + ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text); + return (0); +diff --git a/cups/testhttp.c b/cups/testhttp.c +index bc77b0236..65d862def 100644 +--- a/cups/testhttp.c ++++ b/cups/testhttp.c +@@ -1,11 +1,10 @@ + /* + * HTTP test program for CUPS. + * +- * Copyright © 2007-2018 by Apple Inc. +- * Copyright © 1997-2006 by Easy Software Products. ++ * Copyright 2007-2014 by Apple Inc. ++ * Copyright 1997-2006 by Easy Software Products. + * +- * Licensed under Apache License v2.0. See the file "LICENSE" for more +- * information. ++ * Licensed under Apache License v2.0. See the file "LICENSE" for more information. + */ + + /* +@@ -181,9 +180,6 @@ static uri_test_t uri_tests[] = /* URI test data */ + HTTP_URI_CODING_MOST }, + + /* Bad resource */ +- { HTTP_URI_STATUS_BAD_RESOURCE, "mailto:\r\nbla", +- "mailto", "", "", "", 0, 0, +- HTTP_URI_CODING_MOST }, + { HTTP_URI_STATUS_BAD_RESOURCE, "http://server/index.html%", + "http", "", "server", "", 80, 0, + HTTP_URI_CODING_MOST }, +diff --git a/scheduler/ipp.c b/scheduler/ipp.c +index 89058d285..859250ba8 100644 +--- a/scheduler/ipp.c ++++ b/scheduler/ipp.c +@@ -5848,26 +5848,7 @@ create_subscriptions( + } + + if (recipient) +- { + cupsdLogMessage(CUPSD_LOG_DEBUG, "recipient=\"%s\"", recipient); +- +- +- if (!strncmp(recipient, "mailto:", 7) && user_data) +- { +- char temp[64]; /* Temporary string */ +- +- memcpy(temp, user_data->values[0].unknown.data, user_data->values[0].unknown.length); +- temp[user_data->values[0].unknown.length] = '\0'; +- +- if (httpSeparateURI(HTTP_URI_CODING_ALL, temp, scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_OK) +- { +- send_ipp_status(con, IPP_NOT_POSSIBLE, _("Bad notify-user-data \"%s\"."), temp); +- ippAddInteger(con->response, IPP_TAG_SUBSCRIPTION, IPP_TAG_ENUM, "notify-status-code", IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES); +- return; +- } +- } +- } +- + if (pullmethod) + cupsdLogMessage(CUPSD_LOG_DEBUG, "pullmethod=\"%s\"", pullmethod); + cupsdLogMessage(CUPSD_LOG_DEBUG, "notify-lease-duration=%d", lease); +@@ -7978,16 +7959,13 @@ hold_job(cupsd_client_t *con, /* I - Client connection */ + * Hold the job and return... + */ + +- if ((attr = ippFindAttribute(con->request, "job-hold-until", IPP_TAG_ZERO)) != NULL) +- { +- if ((ippGetValueTag(attr) != IPP_TAG_KEYWORD && ippGetValueTag(attr) != IPP_TAG_NAME && ippGetValueTag(attr) != IPP_TAG_NAMELANG) || ippGetCount(attr) != 1 || !ippValidateAttribute(attr)) +- { +- send_ipp_status(con, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, _("Unsupported 'job-hold-until' value.")); +- ippCopyAttribute(con->response, attr, 0); +- return; +- } ++ if ((attr = ippFindAttribute(con->request, "job-hold-until", ++ IPP_TAG_KEYWORD)) == NULL) ++ attr = ippFindAttribute(con->request, "job-hold-until", IPP_TAG_NAME); + +- when = ippGetString(attr, 0, NULL); ++ if (attr) ++ { ++ when = attr->values[0].string.text; + + cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, cupsdFindDest(job->dest), job, + "Job job-hold-until value changed by user."); +@@ -10351,39 +10329,7 @@ set_job_attrs(cupsd_client_t *con, /* I - Client connection */ + continue; + } + +- if (!ippValidateAttribute(attr)) +- { +- send_ipp_status(con, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, _("Bad '%s' value."), attr->name); +- ippCopyAttribute(con->response, attr, 0); +- return; +- } +- +- if (!strcmp(attr->name, "job-hold-until")) +- { +- const char *when = ippGetString(attr, 0, NULL); +- /* job-hold-until value */ +- +- if ((ippGetValueTag(attr) != IPP_TAG_KEYWORD && ippGetValueTag(attr) != IPP_TAG_NAME && ippGetValueTag(attr) != IPP_TAG_NAMELANG) || ippGetCount(attr) != 1) +- { +- send_ipp_status(con, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, _("Unsupported 'job-hold-until' value.")); +- ippCopyAttribute(con->response, attr, 0); +- return; +- } +- +- cupsdLogJob(job, CUPSD_LOG_DEBUG, "Setting job-hold-until to %s", when); +- cupsdSetJobHoldUntil(job, when, 0); +- +- if (!strcmp(when, "no-hold")) +- { +- cupsdReleaseJob(job); +- check_jobs = 1; +- } +- else +- cupsdSetJobState(job, IPP_JOB_HELD, CUPSD_JOB_DEFAULT, "Job held by \"%s\".", username); +- +- event |= CUPSD_EVENT_JOB_CONFIG_CHANGED | CUPSD_EVENT_JOB_STATE; +- } +- else if (!strcmp(attr->name, "job-priority")) ++ if (!strcmp(attr->name, "job-priority")) + { + /* + * Change the job priority... +@@ -10503,6 +10449,28 @@ set_job_attrs(cupsd_client_t *con, /* I - Client connection */ + */ + + ippCopyAttribute(job->attrs, attr, 0); ++ ++ /* ++ * See if the job-name or job-hold-until is being changed. ++ */ ++ ++ if (!strcmp(attr->name, "job-hold-until")) ++ { ++ cupsdLogJob(job, CUPSD_LOG_DEBUG, "Setting job-hold-until to %s", ++ attr->values[0].string.text); ++ cupsdSetJobHoldUntil(job, attr->values[0].string.text, 0); ++ ++ if (!strcmp(attr->values[0].string.text, "no-hold")) ++ { ++ cupsdReleaseJob(job); ++ check_jobs = 1; ++ } ++ else ++ cupsdSetJobState(job, IPP_JOB_HELD, CUPSD_JOB_DEFAULT, ++ "Job held by \"%s\".", username); ++ ++ event |= CUPSD_EVENT_JOB_CONFIG_CHANGED | CUPSD_EVENT_JOB_STATE; ++ } + } + else if (attr->value_tag == IPP_TAG_DELETEATTR) + { +@@ -11320,35 +11288,81 @@ validate_job(cupsd_client_t *con, /* I - Client connection */ + } + } + +- /* +- * Is the job-hold-until value valid? +- */ +- +- if ((attr = ippFindAttribute(con->request, "job-hold-until", IPP_TAG_ZERO)) != NULL && ((ippGetValueTag(attr) != IPP_TAG_KEYWORD && ippGetValueTag(attr) != IPP_TAG_NAME && ippGetValueTag(attr) != IPP_TAG_NAMELANG) || ippGetCount(attr) != 1 || !ippValidateAttribute(attr))) +- { +- send_ipp_status(con, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, _("Unsupported 'job-hold-until' value.")); +- ippCopyAttribute(con->response, attr, 0); +- return; +- } +- + /* + * Is the job-name valid? + */ + + if ((name = ippFindAttribute(con->request, "job-name", IPP_TAG_ZERO)) != NULL) + { ++ int bad_name = 0; /* Is the job-name value bad? */ ++ + if ((name->value_tag != IPP_TAG_NAME && name->value_tag != IPP_TAG_NAMELANG) || +- name->num_values != 1 || !ippValidateAttribute(name)) ++ name->num_values != 1) ++ { ++ bad_name = 1; ++ } ++ else ++ { ++ /* ++ * Validate that job-name conforms to RFC 5198 (Network Unicode) and ++ * IPP Everywhere requirements for "name" values... ++ */ ++ ++ const unsigned char *nameptr; /* Pointer into "job-name" attribute */ ++ ++ for (nameptr = (unsigned char *)name->values[0].string.text; ++ *nameptr; ++ nameptr ++) ++ { ++ if (*nameptr < ' ' && *nameptr != '\t') ++ break; ++ else if (*nameptr == 0x7f) ++ break; ++ else if ((*nameptr & 0xe0) == 0xc0) ++ { ++ if ((nameptr[1] & 0xc0) != 0x80) ++ break; ++ ++ nameptr ++; ++ } ++ else if ((*nameptr & 0xf0) == 0xe0) ++ { ++ if ((nameptr[1] & 0xc0) != 0x80 || ++ (nameptr[2] & 0xc0) != 0x80) ++ break; ++ ++ nameptr += 2; ++ } ++ else if ((*nameptr & 0xf8) == 0xf0) ++ { ++ if ((nameptr[1] & 0xc0) != 0x80 || ++ (nameptr[2] & 0xc0) != 0x80 || ++ (nameptr[3] & 0xc0) != 0x80) ++ break; ++ ++ nameptr += 3; ++ } ++ else if (*nameptr & 0x80) ++ break; ++ } ++ ++ if (*nameptr) ++ bad_name = 1; ++ } ++ ++ if (bad_name) + { + if (StrictConformance) + { +- send_ipp_status(con, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, _("Unsupported 'job-name' value.")); ++ send_ipp_status(con, IPP_ATTRIBUTES, ++ _("Unsupported 'job-name' value.")); + ippCopyAttribute(con->response, name, 0); + return; + } + else + { +- cupsdLogMessage(CUPSD_LOG_WARN, "Unsupported 'job-name' value, deleting from request."); ++ cupsdLogMessage(CUPSD_LOG_WARN, ++ "Unsupported 'job-name' value, deleting from request."); + ippDeleteAttribute(con->request, name); + } + } diff --git a/debian/patches/0037-Build-mantohtml-with-the-build-architecture-compiler.patch b/debian/patches/0038-Build-mantohtml-with-the-build-architecture-compiler.patch index 4578873d8..d66dfd955 100644 --- a/debian/patches/0037-Build-mantohtml-with-the-build-architecture-compiler.patch +++ b/debian/patches/0038-Build-mantohtml-with-the-build-architecture-compiler.patch @@ -1,4 +1,4 @@ -From 47bf74fd8fafbb544ff5f26f765e63ecc69c59a1 Mon Sep 17 00:00:00 2001 +From 2e2120be4062ab7719f0c5f0fc72dfedd38a596c Mon Sep 17 00:00:00 2001 From: Helmut Grohne <helmut@subdivi.de> Date: Tue, 9 Aug 2016 18:11:49 +0200 Subject: Build mantohtml with the build architecture compiler diff --git a/debian/patches/airprint-support.patch b/debian/patches/airprint-support.patch index 2b33cf84b..bd3bca145 100644 --- a/debian/patches/airprint-support.patch +++ b/debian/patches/airprint-support.patch @@ -1,4 +1,4 @@ -From 7c40803880a62a7d10dbd07947da656fc46e1747 Mon Sep 17 00:00:00 2001 +From 6f29799398464424872aa59697219066860e34c3 Mon Sep 17 00:00:00 2001 From: Till Kamppeter <till.kamppeter@gmail.com> Date: Tue, 9 Aug 2016 18:11:29 +0200 Subject: Patch to support Apple AirPrint (printing from iPhone, iPad, iPod diff --git a/debian/patches/confdirperms.patch b/debian/patches/confdirperms.patch index 91d24a326..89e9a4451 100644 --- a/debian/patches/confdirperms.patch +++ b/debian/patches/confdirperms.patch @@ -1,4 +1,4 @@ -From e0c2e772244437feb5a48f63c99f06fba45fc1b0 Mon Sep 17 00:00:00 2001 +From 4eed075dd693111e5f6eae084eeaf997c0dfff31 Mon Sep 17 00:00:00 2001 From: Martin Pitt <mpitt@debian.org> Date: Tue, 9 Aug 2016 18:11:41 +0200 Subject: Do not mess with the permissions of cupsd.conf. diff --git a/debian/patches/cups-deviced-allow-device-ids-with-newline.patch b/debian/patches/cups-deviced-allow-device-ids-with-newline.patch index fabae9d9a..de6b00f64 100644 --- a/debian/patches/cups-deviced-allow-device-ids-with-newline.patch +++ b/debian/patches/cups-deviced-allow-device-ids-with-newline.patch @@ -1,4 +1,4 @@ -From 3d7e18de483839524ec3412f4cd906d88ea036e8 Mon Sep 17 00:00:00 2001 +From 2848f69e5cbce7011d2494fabccd9542353c0810 Mon Sep 17 00:00:00 2001 From: Till Kamppeter <till.kamppeter@gmail.com> Date: Tue, 9 Aug 2016 18:11:28 +0200 Subject: Some printers have broken device IDs with newline diff --git a/debian/patches/cups-set-default-error-policy-retry-job.patch b/debian/patches/cups-set-default-error-policy-retry-job.patch index 25860bb57..7d0a8024e 100644 --- a/debian/patches/cups-set-default-error-policy-retry-job.patch +++ b/debian/patches/cups-set-default-error-policy-retry-job.patch @@ -1,4 +1,4 @@ -From 5d24752d640d46342aeb5f4453bdadfe9ab9a70c Mon Sep 17 00:00:00 2001 +From ebcdd79e1d4136c47dadfe65d9a6cb80d3b56666 Mon Sep 17 00:00:00 2001 From: Martin Pitt <martin.pitt@ubuntu.com> Date: Tue, 9 Aug 2016 18:11:47 +0200 Subject: Set default job error policy to "retry-job", since it is less diff --git a/debian/patches/cups-snmp-oids-device-id-hp-ricoh.patch b/debian/patches/cups-snmp-oids-device-id-hp-ricoh.patch index ac2a96969..646a12321 100644 --- a/debian/patches/cups-snmp-oids-device-id-hp-ricoh.patch +++ b/debian/patches/cups-snmp-oids-device-id-hp-ricoh.patch @@ -1,4 +1,4 @@ -From ee092fd293194a089cf184cea39f6f4a34ede080 Mon Sep 17 00:00:00 2001 +From 9a85af77aab6aa4f0a829444634869863301d9e6 Mon Sep 17 00:00:00 2001 From: Tim Waugh <twaugh@redhat.com> Date: Tue, 9 Aug 2016 18:11:30 +0200 Subject: Let the "snmp" backend also use manufacturer-specific MIBs diff --git a/debian/patches/cupsd-set-default-for-SyncOnClose-to-Yes.patch b/debian/patches/cupsd-set-default-for-SyncOnClose-to-Yes.patch index c0b87299c..c7f4c915c 100644 --- a/debian/patches/cupsd-set-default-for-SyncOnClose-to-Yes.patch +++ b/debian/patches/cupsd-set-default-for-SyncOnClose-to-Yes.patch @@ -1,4 +1,4 @@ -From f070a4114879499a8f415b674a1393401c91c247 Mon Sep 17 00:00:00 2001 +From 87e08b60b7bc2a23c6a3938626cc0a08eff2c3f1 Mon Sep 17 00:00:00 2001 From: Tim Waugh <twaugh@redhat.com> Date: Tue, 9 Aug 2016 18:11:46 +0200 Subject: Set the default for SyncOnClose to Yes diff --git a/debian/patches/debianize_cups-config.patch b/debian/patches/debianize_cups-config.patch index 43ac511e0..af41b9b1a 100644 --- a/debian/patches/debianize_cups-config.patch +++ b/debian/patches/debianize_cups-config.patch @@ -1,4 +1,4 @@ -From 69088255842e748dfae0e9ad58d2a4a1f8bd6396 Mon Sep 17 00:00:00 2001 +From 3d66b37646b1dc10c299784fcfe6c0f37dd558b5 Mon Sep 17 00:00:00 2001 From: Didier Raboud <odyx@debian.org> Date: Tue, 9 Aug 2016 18:11:49 +0200 Subject: Use dpkg-architecture in cups-config to make it diff --git a/debian/patches/default_log_settings.patch b/debian/patches/default_log_settings.patch index 332df64b4..1298d6666 100644 --- a/debian/patches/default_log_settings.patch +++ b/debian/patches/default_log_settings.patch @@ -1,4 +1,4 @@ -From fa23820a561c12b4880519ea33ae23f2373bce31 Mon Sep 17 00:00:00 2001 +From 6ac0f617853b1ad8cd3d678f0ef2fe5548696ab5 Mon Sep 17 00:00:00 2001 From: Didier Raboud <odyx@debian.org> Date: Tue, 9 Aug 2016 18:11:40 +0200 Subject: Deactivate CUPS' own log rotating as the system already provides a diff --git a/debian/patches/do-not-broadcast-with-hostnames.patch b/debian/patches/do-not-broadcast-with-hostnames.patch index 522d8a929..fbe4a30ef 100644 --- a/debian/patches/do-not-broadcast-with-hostnames.patch +++ b/debian/patches/do-not-broadcast-with-hostnames.patch @@ -1,4 +1,4 @@ -From 6455902e531b8c7034d7d53b8a555e28099c076b Mon Sep 17 00:00:00 2001 +From 26b164635989c9de18114ba0393d1e179d15307c Mon Sep 17 00:00:00 2001 From: Till Kampetter <till.kampetter@gmail.com> Date: Tue, 9 Aug 2016 18:11:35 +0200 Subject: Do not use host names for broadcasting print queues and diff --git a/debian/patches/drop_unnecessary_dependencies.patch b/debian/patches/drop_unnecessary_dependencies.patch index 068487907..1f2dfeaf6 100644 --- a/debian/patches/drop_unnecessary_dependencies.patch +++ b/debian/patches/drop_unnecessary_dependencies.patch @@ -1,4 +1,4 @@ -From d275640f4fc2bc105985377e9ee8c97e204bcae9 Mon Sep 17 00:00:00 2001 +From 2c1ddc142eba3f9452c229b84e522b0abd0a0ddb Mon Sep 17 00:00:00 2001 From: Martin Pitt <mpitt@debian.org> Date: Tue, 9 Aug 2016 18:11:25 +0200 Subject: Don't link libcups.so and libcupsimage.so against unnecessary diff --git a/debian/patches/log-debug-history-nearly-unlimited.patch b/debian/patches/log-debug-history-nearly-unlimited.patch index 6a93cb734..c9fba2098 100644 --- a/debian/patches/log-debug-history-nearly-unlimited.patch +++ b/debian/patches/log-debug-history-nearly-unlimited.patch @@ -1,4 +1,4 @@ -From a11d946158e4e07be68788e88b9fb4ac6133b621 Mon Sep 17 00:00:00 2001 +From e4f75581f2c9c3f0d105ca16a0d797961ac49111 Mon Sep 17 00:00:00 2001 From: Till Kampetter <till.kampetter@gmail.com> Date: Tue, 9 Aug 2016 18:11:45 +0200 Subject: Make log debug history nearly unlimited diff --git a/debian/patches/logfiles_adm_readable.patch b/debian/patches/logfiles_adm_readable.patch index 57217ef9f..aa137aa41 100644 --- a/debian/patches/logfiles_adm_readable.patch +++ b/debian/patches/logfiles_adm_readable.patch @@ -1,4 +1,4 @@ -From 234226424805012fab055a7a8890e2fdd86fa5cb Mon Sep 17 00:00:00 2001 +From ecb91de222039c8c131fe7d41b03564e51e8cd57 Mon Sep 17 00:00:00 2001 From: Martin Pitt <mpitt@debian.org> Date: Tue, 9 Aug 2016 18:11:38 +0200 Subject: Make log files readable to group "adm", if present. diff --git a/debian/patches/man-cups-lpd-drop-dangling-references.patch b/debian/patches/man-cups-lpd-drop-dangling-references.patch index 4e6c15f42..213fbc2a6 100644 --- a/debian/patches/man-cups-lpd-drop-dangling-references.patch +++ b/debian/patches/man-cups-lpd-drop-dangling-references.patch @@ -1,4 +1,4 @@ -From e07b6b95df841917f9af515aabda12a911c13fb3 Mon Sep 17 00:00:00 2001 +From d815e44999a0a0a7f2e7d0b39632311a708b93a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <bastien.roucaries@u-cergy.fr> Date: Tue, 9 Aug 2016 18:11:48 +0200 Subject: Drop dangling references from cups-lpd.man diff --git a/debian/patches/manpage-translations.patch b/debian/patches/manpage-translations.patch index 9136d3d98..c48628634 100644 --- a/debian/patches/manpage-translations.patch +++ b/debian/patches/manpage-translations.patch @@ -1,4 +1,4 @@ -From fa3e162dcbc513f2be320ac2ec7646ae93a6a83d Mon Sep 17 00:00:00 2001 +From 3bf223a412fdb06943400735e7a133f3dbaad017 Mon Sep 17 00:00:00 2001 From: Didier Raboud <odyx@debian.org> Date: Tue, 9 Aug 2016 18:11:50 +0200 Subject: po4a infrastructure and translations for manpages. diff --git a/debian/patches/move-cupsd-conf-default-to-share.patch b/debian/patches/move-cupsd-conf-default-to-share.patch index 78779a2f2..71441484f 100644 --- a/debian/patches/move-cupsd-conf-default-to-share.patch +++ b/debian/patches/move-cupsd-conf-default-to-share.patch @@ -1,4 +1,4 @@ -From 283e3b55c273b9f7dd58cf779af4f82fb0639369 Mon Sep 17 00:00:00 2001 +From 1e5ebc7a5450a03825151272c2fbee73b4782ba7 Mon Sep 17 00:00:00 2001 From: Didier Raboud <odyx@debian.org> Date: Tue, 9 Aug 2016 18:11:24 +0200 Subject: Move cupsd.conf.default from SERVERROOT to DATADIR diff --git a/debian/patches/no-conffile-timestamp.patch b/debian/patches/no-conffile-timestamp.patch index 8e67d644d..2b9b2e56f 100644 --- a/debian/patches/no-conffile-timestamp.patch +++ b/debian/patches/no-conffile-timestamp.patch @@ -1,4 +1,4 @@ -From 79236d5fe46b20e3781a61cea5070da808aeda34 Mon Sep 17 00:00:00 2001 +From e44fc65be3e2b168a504ddb200e6569dd61ad9b2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joeyh@debian.org> Date: Tue, 9 Aug 2016 18:11:31 +0200 Subject: Disable time stamps in conffiles, to avoid ever-changing files in diff --git a/debian/patches/printer-filtering.patch b/debian/patches/printer-filtering.patch index 90d7b65bb..76abffc90 100644 --- a/debian/patches/printer-filtering.patch +++ b/debian/patches/printer-filtering.patch @@ -1,4 +1,4 @@ -From f62376ef797f2582188d5f25f5b441900b048a6a Mon Sep 17 00:00:00 2001 +From d406000f9a72da97dbae52b563b6ea253b41f0a3 Mon Sep 17 00:00:00 2001 From: Julien Desfossez at Revolution Linux <Julien Desfossez at Revolution Linux> Date: Tue, 9 Aug 2016 18:11:42 +0200 @@ -13,10 +13,10 @@ Patch-Name: printer-filtering.patch 1 file changed, 116 insertions(+) diff --git a/cups/ipp.c b/cups/ipp.c -index 714c2e522..df752df54 100644 +index 179764104..c65790e2c 100644 --- a/cups/ipp.c +++ b/cups/ipp.c -@@ -2734,6 +2734,120 @@ ippNew(void) +@@ -2733,6 +2733,120 @@ ippNew(void) return (temp); } @@ -137,7 +137,7 @@ index 714c2e522..df752df54 100644 /* * 'ippNewRequest()' - Allocate a new IPP request message. -@@ -3080,6 +3194,8 @@ ippReadIO(void *src, /* I - Data source */ +@@ -3079,6 +3193,8 @@ ippReadIO(void *src, /* I - Data source */ */ DEBUG_puts("2ippReadIO: IPP_TAG_END."); diff --git a/debian/patches/reactivate_recommended_driver.patch b/debian/patches/reactivate_recommended_driver.patch index 7c32d7082..6dd89ed0a 100644 --- a/debian/patches/reactivate_recommended_driver.patch +++ b/debian/patches/reactivate_recommended_driver.patch @@ -1,4 +1,4 @@ -From 066cf36862bccf10c03526d091e9f647c02fb149 Mon Sep 17 00:00:00 2001 +From c5842f42fd332bd9a09003bb12522ce269e5a38a Mon Sep 17 00:00:00 2001 From: Till Kampetter <till.kampetter@gmail.com> Date: Tue, 9 Aug 2016 18:11:36 +0200 Subject: CUPS removes the "(recommended)" comments of the NickNames of diff --git a/debian/patches/read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch b/debian/patches/read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch index 9318d54a5..2a650f556 100644 --- a/debian/patches/read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch +++ b/debian/patches/read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch @@ -1,4 +1,4 @@ -From 25b6c1835a1e28df0fc8a83db31959384333714c Mon Sep 17 00:00:00 2001 +From cfe96aaad52138153e29fa1e70c8ade026ddf594 Mon Sep 17 00:00:00 2001 From: Till Kamppeter <till.kamppeter@gmail.com> Date: Tue, 9 Aug 2016 18:11:27 +0200 Subject: Make CUPS reading all option settings in PostScript print @@ -19,10 +19,10 @@ Patch-Name: read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs. 1 file changed, 84 insertions(+) diff --git a/scheduler/ipp.c b/scheduler/ipp.c -index 89058d285..dee031776 100644 +index 859250ba8..18260fe4a 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c -@@ -8711,6 +8711,11 @@ read_job_ticket(cupsd_client_t *con) /* I - Client connection */ +@@ -8689,6 +8689,11 @@ read_job_ticket(cupsd_client_t *con) /* I - Client connection */ ipp_attribute_t *attr, /* Current attribute */ *attr2, /* Job attribute */ *prev2; /* Previous job attribute */ @@ -34,7 +34,7 @@ index 89058d285..dee031776 100644 /* -@@ -8771,6 +8776,85 @@ read_job_ticket(cupsd_client_t *con) /* I - Client connection */ +@@ -8749,6 +8754,85 @@ read_job_ticket(cupsd_client_t *con) /* I - Client connection */ num_options = cupsParseOptions(line + 15, num_options, &options); } diff --git a/debian/patches/removecvstag.patch b/debian/patches/removecvstag.patch index c38edcf4a..dc7828909 100644 --- a/debian/patches/removecvstag.patch +++ b/debian/patches/removecvstag.patch @@ -1,4 +1,4 @@ -From f121ea57daf641eabfa381d15324c5e029fa886a Mon Sep 17 00:00:00 2001 +From ee1b364945c0aae61ec9bd03c2becb01ed68d83b Mon Sep 17 00:00:00 2001 From: Kenshi Muto <kmuto@debian.org> Date: Tue, 9 Aug 2016 18:11:33 +0200 Subject: Do not write VCS tags into installed conffiles diff --git a/debian/patches/rename-systemd-units.patch b/debian/patches/rename-systemd-units.patch index 486eb543d..6b8f064a6 100644 --- a/debian/patches/rename-systemd-units.patch +++ b/debian/patches/rename-systemd-units.patch @@ -1,4 +1,4 @@ -From b934cb01ea6796f201bb753643247812b4a7aaf9 Mon Sep 17 00:00:00 2001 +From 31e4faf8c67aea1d6adf263d4577a46aa9a556b3 Mon Sep 17 00:00:00 2001 From: Didier Raboud <odyx@debian.org> Date: Tue, 9 Aug 2016 18:11:34 +0200 Subject: Rename the systemd service file from org.cups.cups.* to cups.* diff --git a/debian/patches/series b/debian/patches/series index 2d3430ca1..9ccf2f0b2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -13,6 +13,7 @@ tests-fix-ppdLocalize-on-unclean-env.patch tests-use-ipv4-lo-address.patch tests-make-lpstat-call-reproducible.patch tests-no-pdftourf.patch +0016-Revert-Mirror-validation-changes-from-2.2-branch.patch move-cupsd-conf-default-to-share.patch drop_unnecessary_dependencies.patch read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch @@ -34,5 +35,5 @@ cupsd-set-default-for-SyncOnClose-to-Yes.patch cups-set-default-error-policy-retry-job.patch man-cups-lpd-drop-dangling-references.patch debianize_cups-config.patch -0037-Build-mantohtml-with-the-build-architecture-compiler.patch +0038-Build-mantohtml-with-the-build-architecture-compiler.patch manpage-translations.patch diff --git a/debian/patches/show-compile-command-lines.patch b/debian/patches/show-compile-command-lines.patch index 211e82b91..ed9718157 100644 --- a/debian/patches/show-compile-command-lines.patch +++ b/debian/patches/show-compile-command-lines.patch @@ -1,4 +1,4 @@ -From f2881d404bb88321cc5791b8fcd83fe3abfaebce Mon Sep 17 00:00:00 2001 +From 59fe87c8b60a03d1b1151d5007288738c53c1e94 Mon Sep 17 00:00:00 2001 From: Till Kampetter <till.kampetter@gmail.com> Date: Tue, 9 Aug 2016 18:11:43 +0200 Subject: Show compile command lines diff --git a/scheduler/ipp.c b/scheduler/ipp.c index dee031776..18260fe4a 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -5848,26 +5848,7 @@ create_subscriptions( } if (recipient) - { cupsdLogMessage(CUPSD_LOG_DEBUG, "recipient=\"%s\"", recipient); - - - if (!strncmp(recipient, "mailto:", 7) && user_data) - { - char temp[64]; /* Temporary string */ - - memcpy(temp, user_data->values[0].unknown.data, user_data->values[0].unknown.length); - temp[user_data->values[0].unknown.length] = '\0'; - - if (httpSeparateURI(HTTP_URI_CODING_ALL, temp, scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_OK) - { - send_ipp_status(con, IPP_NOT_POSSIBLE, _("Bad notify-user-data \"%s\"."), temp); - ippAddInteger(con->response, IPP_TAG_SUBSCRIPTION, IPP_TAG_ENUM, "notify-status-code", IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES); - return; - } - } - } - if (pullmethod) cupsdLogMessage(CUPSD_LOG_DEBUG, "pullmethod=\"%s\"", pullmethod); cupsdLogMessage(CUPSD_LOG_DEBUG, "notify-lease-duration=%d", lease); @@ -7978,16 +7959,13 @@ hold_job(cupsd_client_t *con, /* I - Client connection */ * Hold the job and return... */ - if ((attr = ippFindAttribute(con->request, "job-hold-until", IPP_TAG_ZERO)) != NULL) - { - if ((ippGetValueTag(attr) != IPP_TAG_KEYWORD && ippGetValueTag(attr) != IPP_TAG_NAME && ippGetValueTag(attr) != IPP_TAG_NAMELANG) || ippGetCount(attr) != 1 || !ippValidateAttribute(attr)) - { - send_ipp_status(con, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, _("Unsupported 'job-hold-until' value.")); - ippCopyAttribute(con->response, attr, 0); - return; - } + if ((attr = ippFindAttribute(con->request, "job-hold-until", + IPP_TAG_KEYWORD)) == NULL) + attr = ippFindAttribute(con->request, "job-hold-until", IPP_TAG_NAME); - when = ippGetString(attr, 0, NULL); + if (attr) + { + when = attr->values[0].string.text; cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, cupsdFindDest(job->dest), job, "Job job-hold-until value changed by user."); @@ -10435,39 +10413,7 @@ set_job_attrs(cupsd_client_t *con, /* I - Client connection */ continue; } - if (!ippValidateAttribute(attr)) - { - send_ipp_status(con, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, _("Bad '%s' value."), attr->name); - ippCopyAttribute(con->response, attr, 0); - return; - } - - if (!strcmp(attr->name, "job-hold-until")) - { - const char *when = ippGetString(attr, 0, NULL); - /* job-hold-until value */ - - if ((ippGetValueTag(attr) != IPP_TAG_KEYWORD && ippGetValueTag(attr) != IPP_TAG_NAME && ippGetValueTag(attr) != IPP_TAG_NAMELANG) || ippGetCount(attr) != 1) - { - send_ipp_status(con, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, _("Unsupported 'job-hold-until' value.")); - ippCopyAttribute(con->response, attr, 0); - return; - } - - cupsdLogJob(job, CUPSD_LOG_DEBUG, "Setting job-hold-until to %s", when); - cupsdSetJobHoldUntil(job, when, 0); - - if (!strcmp(when, "no-hold")) - { - cupsdReleaseJob(job); - check_jobs = 1; - } - else - cupsdSetJobState(job, IPP_JOB_HELD, CUPSD_JOB_DEFAULT, "Job held by \"%s\".", username); - - event |= CUPSD_EVENT_JOB_CONFIG_CHANGED | CUPSD_EVENT_JOB_STATE; - } - else if (!strcmp(attr->name, "job-priority")) + if (!strcmp(attr->name, "job-priority")) { /* * Change the job priority... @@ -10587,6 +10533,28 @@ set_job_attrs(cupsd_client_t *con, /* I - Client connection */ */ ippCopyAttribute(job->attrs, attr, 0); + + /* + * See if the job-name or job-hold-until is being changed. + */ + + if (!strcmp(attr->name, "job-hold-until")) + { + cupsdLogJob(job, CUPSD_LOG_DEBUG, "Setting job-hold-until to %s", + attr->values[0].string.text); + cupsdSetJobHoldUntil(job, attr->values[0].string.text, 0); + + if (!strcmp(attr->values[0].string.text, "no-hold")) + { + cupsdReleaseJob(job); + check_jobs = 1; + } + else + cupsdSetJobState(job, IPP_JOB_HELD, CUPSD_JOB_DEFAULT, + "Job held by \"%s\".", username); + + event |= CUPSD_EVENT_JOB_CONFIG_CHANGED | CUPSD_EVENT_JOB_STATE; + } } else if (attr->value_tag == IPP_TAG_DELETEATTR) { @@ -11405,34 +11373,80 @@ validate_job(cupsd_client_t *con, /* I - Client connection */ } /* - * Is the job-hold-until value valid? - */ - - if ((attr = ippFindAttribute(con->request, "job-hold-until", IPP_TAG_ZERO)) != NULL && ((ippGetValueTag(attr) != IPP_TAG_KEYWORD && ippGetValueTag(attr) != IPP_TAG_NAME && ippGetValueTag(attr) != IPP_TAG_NAMELANG) || ippGetCount(attr) != 1 || !ippValidateAttribute(attr))) - { - send_ipp_status(con, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, _("Unsupported 'job-hold-until' value.")); - ippCopyAttribute(con->response, attr, 0); - return; - } - - /* * Is the job-name valid? */ if ((name = ippFindAttribute(con->request, "job-name", IPP_TAG_ZERO)) != NULL) { + int bad_name = 0; /* Is the job-name value bad? */ + if ((name->value_tag != IPP_TAG_NAME && name->value_tag != IPP_TAG_NAMELANG) || - name->num_values != 1 || !ippValidateAttribute(name)) + name->num_values != 1) + { + bad_name = 1; + } + else + { + /* + * Validate that job-name conforms to RFC 5198 (Network Unicode) and + * IPP Everywhere requirements for "name" values... + */ + + const unsigned char *nameptr; /* Pointer into "job-name" attribute */ + + for (nameptr = (unsigned char *)name->values[0].string.text; + *nameptr; + nameptr ++) + { + if (*nameptr < ' ' && *nameptr != '\t') + break; + else if (*nameptr == 0x7f) + break; + else if ((*nameptr & 0xe0) == 0xc0) + { + if ((nameptr[1] & 0xc0) != 0x80) + break; + + nameptr ++; + } + else if ((*nameptr & 0xf0) == 0xe0) + { + if ((nameptr[1] & 0xc0) != 0x80 || + (nameptr[2] & 0xc0) != 0x80) + break; + + nameptr += 2; + } + else if ((*nameptr & 0xf8) == 0xf0) + { + if ((nameptr[1] & 0xc0) != 0x80 || + (nameptr[2] & 0xc0) != 0x80 || + (nameptr[3] & 0xc0) != 0x80) + break; + + nameptr += 3; + } + else if (*nameptr & 0x80) + break; + } + + if (*nameptr) + bad_name = 1; + } + + if (bad_name) { if (StrictConformance) { - send_ipp_status(con, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, _("Unsupported 'job-name' value.")); + send_ipp_status(con, IPP_ATTRIBUTES, + _("Unsupported 'job-name' value.")); ippCopyAttribute(con->response, name, 0); return; } else { - cupsdLogMessage(CUPSD_LOG_WARN, "Unsupported 'job-name' value, deleting from request."); + cupsdLogMessage(CUPSD_LOG_WARN, + "Unsupported 'job-name' value, deleting from request."); ippDeleteAttribute(con->request, name); } } |