1838455 - ipp/socket backends connect to turned off device for eternity (contimeout is not applied)

This commit is contained in:
Zdenek Dohnal 2020-05-21 10:16:24 +02:00
parent 5aa43ca31b
commit 79f23cfa69
2 changed files with 35 additions and 1 deletions

25
cups-etimedout.patch Normal file
View File

@ -0,0 +1,25 @@
diff --git a/cups/http-addrlist.c b/cups/http-addrlist.c
index e4ffc3d..a989055 100644
--- a/cups/http-addrlist.c
+++ b/cups/http-addrlist.c
@@ -240,7 +240,10 @@ httpAddrConnect2(
}
if (!addrlist && nfds == 0)
+ {
+ errno = EHOSTDOWN;
break;
+ }
/*
* See if we can connect to any of the addresses so far...
@@ -371,6 +374,9 @@ httpAddrConnect2(
remaining -= 250;
}
+ if (remaining <= 0)
+ errno = ETIMEDOUT;
+
while (nfds > 0)
{
nfds --;

View File

@ -15,7 +15,7 @@ Summary: CUPS printing system
Name: cups Name: cups
Epoch: 1 Epoch: 1
Version: 2.3.3 Version: 2.3.3
Release: 1%{?dist} Release: 2%{?dist}
License: ASL 2.0 with exceptions for GPL2/LGPL2 License: ASL 2.0 with exceptions for GPL2/LGPL2
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
@ -100,6 +100,9 @@ Patch24: cups-ppdleak.patch
# crashes with wide roll printers in rastertopwg filter # crashes with wide roll printers in rastertopwg filter
# https://github.com/apple/cups/pull/5773/ # https://github.com/apple/cups/pull/5773/
Patch25: cups-rastertopwg-crash.patch Patch25: cups-rastertopwg-crash.patch
# job for disconnected devices are processing for eternity
# https://github.com/apple/cups/pull/5782
Patch26: cups-etimedout.patch
# selinux and audit enablement for CUPS - needs work and CUPS upstream wants # selinux and audit enablement for CUPS - needs work and CUPS upstream wants
# to have these features implemented their way in the future # to have these features implemented their way in the future
@ -313,6 +316,9 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in
%patch23 -p1 -b .print-color-mode %patch23 -p1 -b .print-color-mode
%patch24 -p1 -b .ppdleak %patch24 -p1 -b .ppdleak
%patch25 -p1 -b .rastertopwg-crash %patch25 -p1 -b .rastertopwg-crash
# job for disconnected devices are processing for eternity
# https://github.com/apple/cups/pull/5782
%patch26 -p1 -b .etimedout
#### UPSTREAMED PATCHES #### #### UPSTREAMED PATCHES ####
@ -741,6 +747,9 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man7/ippevepcl.7.gz %{_mandir}/man7/ippevepcl.7.gz
%changelog %changelog
* Wed May 20 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3-2
- 1838455 - ipp/socket backends connect to turned off device for eternity (contimeout is not applied)
* Tue May 19 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3-1 * Tue May 19 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3-1
- 2.3.3 - 2.3.3