Fixed case when no username request on printing

i9 changed/i9/cups-2.3.3op2-16.el9_2.1.inferit.1
Alexey Berezhok 1 year ago
parent 54992e0f93
commit a4d2b3c947

@ -0,0 +1,29 @@
From 4d2a45eb25136f57686887a0c27209ffed4e5ad4 Mon Sep 17 00:00:00 2001
From: Alexey Berezhok <alexey.berezhok@softline.com>
Date: Wed, 13 Sep 2023 19:14:41 +0300
Subject: [PATCH] Fixed case when no username request on printing
---
scheduler/job.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scheduler/job.c b/scheduler/job.c
index 0223bee..65d51d6 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -3658,6 +3658,12 @@ finalize_job(cupsd_job_t *job, /* I - Job */
ippSetString(job->attrs, &job->reasons, 0,
"cups-held-for-authentication");
}
+ if (job->printer->num_auth_info_required == 1 && !strcmp(job->printer->auth_info_required[0], "none"))
+ {
+ // Default to "username,password" authentication if none is specified...
+ cupsdSetAuthInfoRequired(job->printer, "username,password", NULL);
+ }
+
break;
case CUPS_BACKEND_RETRY :
--
2.39.1

@ -24,7 +24,7 @@ Summary: CUPS printing system
Name: cups
Epoch: 1
Version: 2.3.3%{OP_VER}
Release: 16%{?dist}.1
Release: 16%{?dist}.1.inferit.1
License: ASL 2.0
Url: http://www.cups.org/
# Apple stopped uploading the new versions into github, use OpenPrinting fork
@ -115,6 +115,7 @@ Patch29: 0001-scheduler-cert.c-Fix-string-comparison-fixes-CVE-202.patch
# CVE-2023-32360 cups: Information leak through Cups-Get-Document operation
Patch30: 0001-Require-authentication-for-CUPS-Get-Document.patch
Patch101: 0001-Fixed-case-when-no-username-request-on-printing.patch
##### Patches removed because IMHO they aren't no longer needed
##### but still I'll leave them in git in case their removal
@ -363,6 +364,8 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in
%patch100 -p1 -b .lspp
%endif
%patch101 -p1
# Log to the system journal by default (bug #1078781, bug #1519331).
sed -i -e 's,^ErrorLog .*$,ErrorLog syslog,' conf/cups-files.conf.in
@ -791,6 +794,9 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man7/ippeveps.7.gz
%changelog
* Wed Sep 13 2023 Alexey Berezhok <alexey.berezhok@msvsphere-os.ru> - 1:2.3.3op2-16.1.inferit.1
- Fixed case when no username request on printing
* Tue Aug 15 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-16.1
- CVE-2023-32360 cups: Information leak through Cups-Get-Document operation

Loading…
Cancel
Save