Compare commits
1 Commits
da4d7ff6c7
...
1cadd9c7b7
Author | SHA1 | Date | |
---|---|---|---|
|
1cadd9c7b7 |
@ -1,43 +0,0 @@
|
|||||||
diff -up cups-2.2.6/cups/http-addrlist.c.cupsgetjobs-pollhup cups-2.2.6/cups/http-addrlist.c
|
|
||||||
--- cups-2.2.6/cups/http-addrlist.c.cupsgetjobs-pollhup 2023-12-19 18:25:15.484637450 +0100
|
|
||||||
+++ cups-2.2.6/cups/http-addrlist.c 2023-12-19 18:28:57.129163387 +0100
|
|
||||||
@@ -313,6 +313,39 @@ httpAddrConnect2(
|
|
||||||
{
|
|
||||||
# ifdef HAVE_POLL
|
|
||||||
DEBUG_printf(("pfds[%d].revents=%x\n", i, pfds[i].revents));
|
|
||||||
+
|
|
||||||
+# ifdef _WIN32
|
|
||||||
+ if (((WSAGetLastError() == WSAEINPROGRESS) && (pfds[i].revents & POLLIN) && (pfds[i].revents & POLLOUT)) ||
|
|
||||||
+ ((pfds[i].revents & POLLHUP) && (pfds[i].revents & (POLLIN|POLLOUT))))
|
|
||||||
+# else
|
|
||||||
+ if (((errno == EINPROGRESS) && (pfds[i].revents & POLLIN) && (pfds[i].revents & POLLOUT)) ||
|
|
||||||
+ ((pfds[i].revents & POLLHUP) && (pfds[i].revents & (POLLIN|POLLOUT))))
|
|
||||||
+# endif /* _WIN32 */
|
|
||||||
+ {
|
|
||||||
+ // Some systems generate POLLIN or POLLOUT together with POLLHUP when doing
|
|
||||||
+ // asynchronous connections. The solution seems to be to use getsockopt to
|
|
||||||
+ // check the SO_ERROR value and ignore the POLLHUP if there is no error or
|
|
||||||
+ // the error is EINPROGRESS.
|
|
||||||
+
|
|
||||||
+ int sres, /* Return value from getsockopt() - 0, or -1 if error */
|
|
||||||
+ serr; /* Option SO_ERROR value */
|
|
||||||
+ socklen_t slen = sizeof(serr); /* Option value size */
|
|
||||||
+
|
|
||||||
+ sres = getsockopt(fds[i], SOL_SOCKET, SO_ERROR, &serr, &slen);
|
|
||||||
+
|
|
||||||
+ if (sres || serr)
|
|
||||||
+ {
|
|
||||||
+ pfds[i].revents |= POLLERR;
|
|
||||||
+# ifdef DEBUG
|
|
||||||
+ DEBUG_printf(("1httpAddrConnect2: getsockopt returned: %d with error: %s", sres, strerror(serr)));
|
|
||||||
+# endif
|
|
||||||
+ }
|
|
||||||
+ else if (pfds[i].revents && (pfds[i].revents & POLLHUP) && (pfds[i].revents & (POLLIN | POLLOUT)))
|
|
||||||
+ {
|
|
||||||
+ pfds[i].revents &= ~POLLHUP;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (pfds[i].revents && !(pfds[i].revents & (POLLERR | POLLHUP)))
|
|
||||||
# else
|
|
||||||
if (FD_ISSET(fds[i], &input_set) && !FD_ISSET(fds[i], &error_set))
|
|
20
cups.spec
20
cups.spec
@ -24,7 +24,7 @@ Summary: CUPS printing system
|
|||||||
Name: cups
|
Name: cups
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.3.3%{OP_VER}
|
Version: 2.3.3%{OP_VER}
|
||||||
Release: 23%{?dist}
|
Release: 22%{?dist}
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Url: http://www.cups.org/
|
Url: http://www.cups.org/
|
||||||
# Apple stopped uploading the new versions into github, use OpenPrinting fork
|
# Apple stopped uploading the new versions into github, use OpenPrinting fork
|
||||||
@ -130,8 +130,6 @@ Patch36: 0001-Require-authentication-for-CUPS-Get-Document.patch
|
|||||||
Patch37: cups-preservejobfiles-leak.patch
|
Patch37: cups-preservejobfiles-leak.patch
|
||||||
# RHEL-15308 cupsd fails to open cups-files.conf and the resulting error message is lost
|
# RHEL-15308 cupsd fails to open cups-files.conf and the resulting error message is lost
|
||||||
Patch38: 0001-scheduler-conf.c-Print-to-stderr-if-we-don-t-open-cu.patch
|
Patch38: 0001-scheduler-conf.c-Print-to-stderr-if-we-don-t-open-cu.patch
|
||||||
# RHEL-19495 cupsGetJobs fails to connect if poll() gets POLLOUT|POLLHUP in revents
|
|
||||||
Patch39: 0001-httpAddrConnect2-Check-for-error-if-POLLHUP-is-in-va.patch
|
|
||||||
|
|
||||||
|
|
||||||
##### Patches removed because IMHO they aren't no longer needed
|
##### Patches removed because IMHO they aren't no longer needed
|
||||||
@ -170,16 +168,6 @@ BuildRequires: libselinux-devel
|
|||||||
BuildRequires: audit-libs-devel
|
BuildRequires: audit-libs-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# some of cups-filters content was split into independent
|
|
||||||
# subpackages to prevent larger dependency tree (cups, avahi)
|
|
||||||
# for filters themselves (RHEL-19201)
|
|
||||||
# recommend the new subpackages, which are not
|
|
||||||
# critical for cups (thus no hard requirement), to prevent
|
|
||||||
# removal of their content after upgrade with default DNF settings,
|
|
||||||
# to new cups-filters, where the content is missing (RHEL-19205)
|
|
||||||
Recommends: cups-browsed
|
|
||||||
Recommends: cups-filters-driverless
|
|
||||||
|
|
||||||
# getaddrinfo from glibc needs nss-mdns or systemd-resolved for resolving
|
# getaddrinfo from glibc needs nss-mdns or systemd-resolved for resolving
|
||||||
# mdns .local addresses. Don't require a specific package for now and let
|
# mdns .local addresses. Don't require a specific package for now and let
|
||||||
# the user to decide what to use
|
# the user to decide what to use
|
||||||
@ -401,8 +389,6 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in
|
|||||||
%patch37 -p1 -b .preservejobfiles-leak
|
%patch37 -p1 -b .preservejobfiles-leak
|
||||||
# RHEL-15308 cupsd fails to open cups-files.conf and the resulting error message is lost
|
# RHEL-15308 cupsd fails to open cups-files.conf and the resulting error message is lost
|
||||||
%patch38 -p1 -b .log-stderr
|
%patch38 -p1 -b .log-stderr
|
||||||
# RHEL-19495 cupsGetJobs fails to connect if poll() gets POLLOUT|POLLHUP in revents
|
|
||||||
%patch39 -p1 -b .cupsgetjobs-pollhup
|
|
||||||
|
|
||||||
%if %{lspp}
|
%if %{lspp}
|
||||||
# LSPP support.
|
# LSPP support.
|
||||||
@ -837,10 +823,6 @@ rm -f %{cups_serverbin}/backend/smb
|
|||||||
%{_mandir}/man7/ippeveps.7.gz
|
%{_mandir}/man7/ippeveps.7.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Dec 20 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-23
|
|
||||||
- RHEL-19205 Recommend new cups-filters subpackages with weak dep for better upgrade exp
|
|
||||||
- RHEL-19495 cupsGetJobs fails to connect if poll() gets POLLOUT|POLLHUP in revents
|
|
||||||
|
|
||||||
* Thu Nov 02 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-22
|
* Thu Nov 02 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-22
|
||||||
- RHEL-14931 cupsd memory leak in cupsdDeleteJob() with "PreserveJobHistory Off"
|
- RHEL-14931 cupsd memory leak in cupsdDeleteJob() with "PreserveJobHistory Off"
|
||||||
- RHEL-15308 cupsd fails to open cups-files.conf and the resulting error message is lost
|
- RHEL-15308 cupsd fails to open cups-files.conf and the resulting error message is lost
|
||||||
|
Loading…
Reference in New Issue
Block a user