import cups-2.2.6-41.el8
This commit is contained in:
parent
517647f748
commit
5c47b49014
43
SOURCES/0001-Fix-handling-of-MaxJobTime-0-Issue-5438.patch
Normal file
43
SOURCES/0001-Fix-handling-of-MaxJobTime-0-Issue-5438.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
From 3e4dd41459dabc5d18edbe06eb5b81291885204b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael R Sweet <michael.r.sweet@gmail.com>
|
||||||
|
Date: Wed, 5 Dec 2018 12:18:19 -0500
|
||||||
|
Subject: [PATCH] Fix handling of MaxJobTime 0 (Issue #5438)
|
||||||
|
|
||||||
|
---
|
||||||
|
CHANGES.md | 5 +++--
|
||||||
|
scheduler/job.c | 4 +++-
|
||||||
|
scheduler/printers.c | 2 +-
|
||||||
|
3 files changed, 7 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/scheduler/job.c b/scheduler/job.c
|
||||||
|
index 3cbe56aa8..638f256db 100644
|
||||||
|
--- a/scheduler/job.c
|
||||||
|
+++ b/scheduler/job.c
|
||||||
|
@@ -5148,8 +5148,10 @@ update_job(cupsd_job_t *job) /* I - Job to check */
|
||||||
|
|
||||||
|
if (cancel_after)
|
||||||
|
job->cancel_time = time(NULL) + ippGetInteger(cancel_after, 0);
|
||||||
|
- else
|
||||||
|
+ else if (MaxJobTime > 0)
|
||||||
|
job->cancel_time = time(NULL) + MaxJobTime;
|
||||||
|
+ else
|
||||||
|
+ job->cancel_time = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/scheduler/printers.c b/scheduler/printers.c
|
||||||
|
index bb99907ad..68239d85d 100644
|
||||||
|
--- a/scheduler/printers.c
|
||||||
|
+++ b/scheduler/printers.c
|
||||||
|
@@ -3370,7 +3370,7 @@ add_printer_defaults(cupsd_printer_t *p)/* I - Printer */
|
||||||
|
"document-format-default", NULL, "application/octet-stream");
|
||||||
|
|
||||||
|
if (!cupsGetOption("job-cancel-after", p->num_options, p->options))
|
||||||
|
- ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
|
||||||
|
+ ippAddInteger(p->attrs, IPP_TAG_PRINTER, MaxJobTime > 0 ? IPP_TAG_INTEGER : IPP_TAG_NOVALUE,
|
||||||
|
"job-cancel-after-default", MaxJobTime);
|
||||||
|
|
||||||
|
if (!cupsGetOption("job-hold-until", p->num_options, p->options))
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
From 9539c53065170e97836503074e770d7b5fbf9f83 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael R Sweet <michael.r.sweet@gmail.com>
|
||||||
|
Date: Tue, 16 Jul 2019 09:27:13 -0400
|
||||||
|
Subject: [PATCH] Fix lpadmin with cupsIPPSupplies and cupsSNMPSupplies (Issue
|
||||||
|
#5610)
|
||||||
|
|
||||||
|
---
|
||||||
|
CHANGES.md | 2 ++
|
||||||
|
systemv/lpadmin.c | 9 +++++++--
|
||||||
|
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c
|
||||||
|
index f428368d4..ca6d386b2 100644
|
||||||
|
--- a/systemv/lpadmin.c
|
||||||
|
+++ b/systemv/lpadmin.c
|
||||||
|
@@ -1467,6 +1467,7 @@ set_printer_options(
|
||||||
|
(boolval = cupsGetOption("cupsIPPSupplies", num_options,
|
||||||
|
options)) != NULL)
|
||||||
|
{
|
||||||
|
+ ppdchanged = 1;
|
||||||
|
wrote_ipp_supplies = 1;
|
||||||
|
cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
|
||||||
|
(!_cups_strcasecmp(boolval, "true") ||
|
||||||
|
@@ -1477,6 +1478,7 @@ set_printer_options(
|
||||||
|
(boolval = cupsGetOption("cupsSNMPSupplies", num_options,
|
||||||
|
options)) != NULL)
|
||||||
|
{
|
||||||
|
+ ppdchanged = 1;
|
||||||
|
wrote_snmp_supplies = 1;
|
||||||
|
cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
|
||||||
|
(!_cups_strcasecmp(boolval, "true") ||
|
||||||
|
@@ -1537,6 +1539,8 @@ set_printer_options(
|
||||||
|
(boolval = cupsGetOption("cupsIPPSupplies", num_options,
|
||||||
|
options)) != NULL)
|
||||||
|
{
|
||||||
|
+ ppdchanged = 1;
|
||||||
|
+
|
||||||
|
cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
|
||||||
|
(!_cups_strcasecmp(boolval, "true") ||
|
||||||
|
!_cups_strcasecmp(boolval, "yes") ||
|
||||||
|
@@ -1547,6 +1551,8 @@ set_printer_options(
|
||||||
|
(boolval = cupsGetOption("cupsSNMPSupplies", num_options,
|
||||||
|
options)) != NULL)
|
||||||
|
{
|
||||||
|
+ ppdchanged = 1;
|
||||||
|
+
|
||||||
|
cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
|
||||||
|
(!_cups_strcasecmp(boolval, "true") ||
|
||||||
|
!_cups_strcasecmp(boolval, "yes") ||
|
||||||
|
@@ -1561,8 +1567,7 @@ set_printer_options(
|
||||||
|
* Do the request...
|
||||||
|
*/
|
||||||
|
|
||||||
|
- ippDelete(cupsDoFileRequest(http, request, "/admin/",
|
||||||
|
- ppdchanged ? tempfile : file));
|
||||||
|
+ ippDelete(cupsDoFileRequest(http, request, "/admin/", ppdchanged ? tempfile : file));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clean up temp files... (TODO: catch signals in case we CTRL-C during
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/cgi-bin/ipp-var.c b/cgi-bin/ipp-var.c
|
||||||
|
index 92f1501..7edc058 100644
|
||||||
|
--- a/cgi-bin/ipp-var.c
|
||||||
|
+++ b/cgi-bin/ipp-var.c
|
||||||
|
@@ -275,10 +275,7 @@ cgiMoveJobs(http_t *http, /* I - Connection to server */
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ((user = getenv("REMOTE_USER")) == NULL)
|
||||||
|
- {
|
||||||
|
- puts("Status: 401\n");
|
||||||
|
- exit(0);
|
||||||
|
- }
|
||||||
|
+ user = "guest";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* See if the user has already selected a new destination...
|
@ -0,0 +1,65 @@
|
|||||||
|
From 4ddeb8544e2e5c63a405d9e093ac24704f3deb03 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||||
|
Date: Tue, 21 Jul 2020 12:54:22 +0200
|
||||||
|
Subject: [PATCH] cups/dests.c: cupsGetNamedDest() - set
|
||||||
|
IPP_STATUS_ERROR_NOT_FOUND error if queue was not found lp.c/lpr.c: check for
|
||||||
|
IPP_STATUS_ERROR_NOT_FOUND and generate a proper message if hit
|
||||||
|
|
||||||
|
---
|
||||||
|
berkeley/lpr.c | 6 ++++++
|
||||||
|
cups/dest.c | 3 +++
|
||||||
|
systemv/lp.c | 6 ++++++
|
||||||
|
3 files changed, 15 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/berkeley/lpr.c b/berkeley/lpr.c
|
||||||
|
index 627fa6a4e..a8f78b881 100644
|
||||||
|
--- a/berkeley/lpr.c
|
||||||
|
+++ b/berkeley/lpr.c
|
||||||
|
@@ -234,6 +234,12 @@ main(int argc, /* I - Number of command-line arguments */
|
||||||
|
_cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
+ else if (cupsLastError() == IPP_STATUS_ERROR_NOT_FOUND)
|
||||||
|
+ {
|
||||||
|
+ _cupsLangPrintf(stderr,
|
||||||
|
+ _("%s: Error - The printer or class does not exist."), argv[0]);
|
||||||
|
+ return (1);
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '#' : /* Number of copies */
|
||||||
|
diff --git a/cups/dest.c b/cups/dest.c
|
||||||
|
index cde987a09..2017792a7 100644
|
||||||
|
--- a/cups/dest.c
|
||||||
|
+++ b/cups/dest.c
|
||||||
|
@@ -1839,7 +1839,10 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
|
||||||
|
cupsEnumDests(0, 1000, NULL, 0, 0, (cups_dest_cb_t)cups_name_cb, &data);
|
||||||
|
|
||||||
|
if (!data.dest)
|
||||||
|
+ {
|
||||||
|
+ _cupsSetError(IPP_STATUS_ERROR_NOT_FOUND, _("The printer or class does not exist."), 1);
|
||||||
|
return (NULL);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
dest = data.dest;
|
||||||
|
}
|
||||||
|
diff --git a/systemv/lp.c b/systemv/lp.c
|
||||||
|
index 298c15825..d918b4b14 100644
|
||||||
|
--- a/systemv/lp.c
|
||||||
|
+++ b/systemv/lp.c
|
||||||
|
@@ -161,6 +161,12 @@ main(int argc, /* I - Number of command-line arguments */
|
||||||
|
"name."), argv[0]);
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
+ else if (cupsLastError() == IPP_STATUS_ERROR_NOT_FOUND)
|
||||||
|
+ {
|
||||||
|
+ _cupsLangPrintf(stderr,
|
||||||
|
+ _("%s: Error - The printer or class does not exist."), argv[0]);
|
||||||
|
+ return (1);
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'f' : /* Form */
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -0,0 +1,38 @@
|
|||||||
|
From 08e9b6e1f8497a8159d6bd7cd6dc96ae79a2e704 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bryan Mason <bmason@redhat.com>
|
||||||
|
Date: Thu, 15 Jul 2021 16:26:27 -0700
|
||||||
|
Subject: [PATCH] scheduler/job.c: use gziptoany for raw files (not just raw
|
||||||
|
printers)
|
||||||
|
|
||||||
|
---
|
||||||
|
scheduler/job.c | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/scheduler/job.c b/scheduler/job.c
|
||||||
|
index d8c2efcc6..b448acda5 100644
|
||||||
|
--- a/scheduler/job.c
|
||||||
|
+++ b/scheduler/job.c
|
||||||
|
@@ -501,6 +501,7 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
|
||||||
|
int backroot; /* Run backend as root? */
|
||||||
|
int pid; /* Process ID of new filter process */
|
||||||
|
int banner_page; /* 1 if banner page, 0 otherwise */
|
||||||
|
+ int raw_file; /* 1 if file type is vnd.cups-raw */
|
||||||
|
int filterfds[2][2] = { { -1, -1 }, { -1, -1 } };
|
||||||
|
/* Pipes used between filters */
|
||||||
|
int envc; /* Number of environment variables */
|
||||||
|
@@ -746,8 +747,11 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
|
||||||
|
* Add decompression/raw filter as needed...
|
||||||
|
*/
|
||||||
|
|
||||||
|
+ raw_file = !strcmp(job->filetypes[job->current_file]->super, "application") &&
|
||||||
|
+ !strcmp(job->filetypes[job->current_file]->type, "vnd.cups-raw");
|
||||||
|
+
|
||||||
|
if ((job->compressions[job->current_file] && (!job->printer->remote || job->num_files == 1)) ||
|
||||||
|
- (!job->printer->remote && job->printer->raw && job->num_files > 1))
|
||||||
|
+ (!job->printer->remote && (job->printer->raw || raw_file) && job->num_files > 1))
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Add gziptoany filter to the front of the list...
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
20
SOURCES/cups-restart-job-hold-until.patch
Normal file
20
SOURCES/cups-restart-job-hold-until.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
|
||||||
|
index e0dbc4a..5e9a985 100644
|
||||||
|
--- a/scheduler/ipp.c
|
||||||
|
+++ b/scheduler/ipp.c
|
||||||
|
@@ -9891,11 +9891,10 @@ restart_job(cupsd_client_t *con, /* I - Client connection */
|
||||||
|
cupsdLogJob(job, CUPSD_LOG_DEBUG,
|
||||||
|
"Restarted by \"%s\" with job-hold-until=%s.",
|
||||||
|
username, attr->values[0].string.text);
|
||||||
|
- cupsdSetJobHoldUntil(job, attr->values[0].string.text, 0);
|
||||||
|
-
|
||||||
|
- cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED | CUPSD_EVENT_JOB_STATE,
|
||||||
|
- NULL, job, "Job restarted by user with job-hold-until=%s",
|
||||||
|
- attr->values[0].string.text);
|
||||||
|
+ cupsdSetJobHoldUntil(job, attr->values[0].string.text, 1);
|
||||||
|
+ cupsdSetJobState(job, IPP_JOB_HELD, CUPSD_JOB_DEFAULT,
|
||||||
|
+ "Job restarted by user with job-hold-until=%s",
|
||||||
|
+ attr->values[0].string.text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
@ -15,7 +15,7 @@ Summary: CUPS printing system
|
|||||||
Name: cups
|
Name: cups
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.2.6
|
Version: 2.2.6
|
||||||
Release: 40%{?dist}
|
Release: 41%{?dist}
|
||||||
License: GPLv2+ and LGPLv2 with exceptions and AML
|
License: GPLv2+ and LGPLv2 with exceptions and AML
|
||||||
Url: http://www.cups.org/
|
Url: http://www.cups.org/
|
||||||
Source0: https://github.com/apple/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz
|
Source0: https://github.com/apple/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz
|
||||||
@ -111,6 +111,18 @@ Patch61: cups-sssd.patch
|
|||||||
Patch62: cups-fix-preservejob-times.patch
|
Patch62: cups-fix-preservejob-times.patch
|
||||||
# 1927452 - CVE-2020-10001 cups: access to uninitialized buffer in ipp.c [rhel-8]
|
# 1927452 - CVE-2020-10001 cups: access to uninitialized buffer in ipp.c [rhel-8]
|
||||||
Patch63: cups-cve202010001.patch
|
Patch63: cups-cve202010001.patch
|
||||||
|
# 2006987 - Unauthenticated users can't move print jobs in Web UI
|
||||||
|
Patch64: 0001-cgi-bin-ipp-var.c-Use-guest-user-for-Move-Job-when-n.patch
|
||||||
|
# 2017919 - Setting 'MaxJobTime 0' does not set a job time to unlimited
|
||||||
|
Patch65: 0001-Fix-handling-of-MaxJobTime-0-Issue-5438.patch
|
||||||
|
# 1726383 - "lpadmin -p <queue> -o cupsSNMPSupplies:false" doesn't work
|
||||||
|
Patch66: 0001-Fix-lpadmin-with-cupsIPPSupplies-and-cupsSNMPSupplie.patch
|
||||||
|
# 1982891 - Printing of banner before PCL file only prints banner
|
||||||
|
Patch67: 0001-scheduler-job.c-use-gziptoany-for-raw-files-not-just.patch
|
||||||
|
# 2006591 - Trying to restart and hold a job doesn't work
|
||||||
|
Patch68: cups-restart-job-hold-until.patch
|
||||||
|
# 1811716 - lpr to non-existent printer reports incorrect error
|
||||||
|
Patch69: 0001-cups-dests.c-cupsGetNamedDest-set-IPP_STATUS_ERROR_N.patch
|
||||||
|
|
||||||
Patch100: cups-lspp.patch
|
Patch100: cups-lspp.patch
|
||||||
|
|
||||||
@ -365,6 +377,18 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
|
|||||||
%patch62 -p1 -b .cups-fix-preservejob-times
|
%patch62 -p1 -b .cups-fix-preservejob-times
|
||||||
# 1927452 - CVE-2020-10001 cups: access to uninitialized buffer in ipp.c [rhel-8]
|
# 1927452 - CVE-2020-10001 cups: access to uninitialized buffer in ipp.c [rhel-8]
|
||||||
%patch63 -p1 -b .cve202010001
|
%patch63 -p1 -b .cve202010001
|
||||||
|
# 2006987 - Unauthenticated users can't move print jobs in Web UI
|
||||||
|
%patch64 -p1 -b .move-job
|
||||||
|
# 2017919 - Setting 'MaxJobTime 0' does not set a job time to unlimited
|
||||||
|
%patch65 -p1 -b .maxjobtime
|
||||||
|
# 1726383 - "lpadmin -p <queue> -o cupsSNMPSupplies:false" doesn't work
|
||||||
|
%patch66 -p1 -b .supplies
|
||||||
|
# 1982891 - Printing of banner before PCL file only prints banner
|
||||||
|
%patch67 -p1 -b .banner-rawfiles
|
||||||
|
# 2006591 - Trying to restart and hold a job doesn't work
|
||||||
|
%patch68 -p1 -b .restart-hold-job
|
||||||
|
# 1811716 - lpr to non-existent printer reports incorrect error
|
||||||
|
%patch69 -p1 -b .lplpr-better-error
|
||||||
|
|
||||||
sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in
|
sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in
|
||||||
|
|
||||||
@ -775,6 +799,14 @@ rm -f %{cups_serverbin}/backend/smb
|
|||||||
%{_mandir}/man5/ipptoolfile.5.gz
|
%{_mandir}/man5/ipptoolfile.5.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 03 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.6-41
|
||||||
|
- 2006987 - Unauthenticated users can't move print jobs in Web UI
|
||||||
|
- 2017919 - Setting 'MaxJobTime 0' does not set a job time to unlimited
|
||||||
|
- 1726383 - "lpadmin -p <queue> -o cupsSNMPSupplies:false" doesn't work
|
||||||
|
- 1982891 - Printing of banner before PCL file only prints banner
|
||||||
|
- 2006591 - Trying to restart and hold a job doesn't work
|
||||||
|
- 1811716 - lpr to non-existent printer reports incorrect error
|
||||||
|
|
||||||
* Fri May 14 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.6-40
|
* Fri May 14 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.6-40
|
||||||
- 1955964 - PreserveJobHistory doesn't work with seconds
|
- 1955964 - PreserveJobHistory doesn't work with seconds
|
||||||
- 1927452 - CVE-2020-10001 cups: access to uninitialized buffer in ipp.c [rhel-8]
|
- 1927452 - CVE-2020-10001 cups: access to uninitialized buffer in ipp.c [rhel-8]
|
||||||
|
Loading…
Reference in New Issue
Block a user