From 79f23cfa69fa3af49f5ece0df342f21efa78f0ea Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 21 May 2020 10:16:24 +0200 Subject: [PATCH] 1838455 - ipp/socket backends connect to turned off device for eternity (contimeout is not applied) --- cups-etimedout.patch | 25 +++++++++++++++++++++++++ cups.spec | 11 ++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 cups-etimedout.patch diff --git a/cups-etimedout.patch b/cups-etimedout.patch new file mode 100644 index 0000000..31defda --- /dev/null +++ b/cups-etimedout.patch @@ -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 --; diff --git a/cups.spec b/cups.spec index 176c1c0..26226cc 100644 --- a/cups.spec +++ b/cups.spec @@ -15,7 +15,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 2.3.3 -Release: 1%{?dist} +Release: 2%{?dist} License: ASL 2.0 with exceptions for GPL2/LGPL2 Url: http://www.cups.org/ 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 # https://github.com/apple/cups/pull/5773/ 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 # 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 %patch24 -p1 -b .ppdleak %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 #### @@ -741,6 +747,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man7/ippevepcl.7.gz %changelog +* Wed May 20 2020 Zdenek Dohnal - 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 - 1:2.3.3-1 - 2.3.3