Fixed case when no username request on printing

i9-beta changed/i9-beta/cups-2.3.3op2-21.el9.inferit
Sergey Cherevko 1 year ago
parent a4f9fd8cf4
commit defafea006
Signed by: scherevko
GPG Key ID: D87CBBC16D2E4A72

@ -0,0 +1,29 @@
From 4d2a45eb25136f57686887a0c27209ffed4e5ad4 Mon Sep 17 00:00:00 2001
From: Alexey Berezhok <aberezhok@msvsphere-os.ru>
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: 21%{?dist}
Release: 21%{?dist}.inferit
License: ASL 2.0
Url: http://www.cups.org/
# Apple stopped uploading the new versions into github, use OpenPrinting fork
@ -127,6 +127,7 @@ Patch35: 0001-cups-strlcpy-handle-zero-size.patch
# CVE-2023-32360 cups: Information leak through Cups-Get-Document operation
Patch36: 0001-Require-authentication-for-CUPS-Get-Document.patch
Patch1000: 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
@ -387,6 +388,7 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in
%patch100 -p1 -b .lspp
%endif
%patch1000 -p1
# Log to the system journal by default (bug #1078781, bug #1519331).
sed -i -e 's,^ErrorLog .*$,ErrorLog syslog,' conf/cups-files.conf.in
@ -815,6 +817,10 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man7/ippeveps.7.gz
%changelog
* Wed Oct 11 2023 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 1:2.3.3op2-21.inferit
- Fixed case when no username request on printing (patch by Alexey Berezhok <aberezhok@msvsphere-os.ru>)
- Rebuilt for MSVSphere 9.3
* Fri Sep 22 2023 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1:2.3.3op2-21
- Rebuilt for MSVSphere 9.3 beta
@ -3949,7 +3955,7 @@ rm -f %{cups_serverbin}/backend/smb
* Sat Jan 26 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.12-1
- Initial (conflicting, since alternatives isn't there yet) packaging for
Red Hat Linux
MSVSphere
* Sat Jan 19 2002 Bernhard Rosenkraenzer <bero@redhat.com>
- 1.1.12

Loading…
Cancel
Save