diff --git a/SOURCES/xinetd-2.3.15-udp-wait.patch b/SOURCES/xinetd-2.3.15-udp-wait.patch new file mode 100644 index 0000000..ab72648 --- /dev/null +++ b/SOURCES/xinetd-2.3.15-udp-wait.patch @@ -0,0 +1,37 @@ +Resolves: #1567227 + +--- a/xinetd/confparse.c 2018-05-04 11:00:11.019748833 +0200 ++++ b/xinetd/confparse.c 2018-05-04 11:49:26.519996478 +0200 +@@ -860,6 +860,14 @@ static status_e check_entry( struct serv + } + } + ++ if ( SC_SOCKET_TYPE(scp) == SOCK_DGRAM && !SC_WAITS(scp) ) ++ { ++ msg( LOG_ERR, func, ++ "Service %s has socket_type dgram, but does not wait", ++ SC_NAME(scp) ); ++ return FAILED; ++ } ++ + if ( service_attr_check( scp ) == FAILED ) + return( FAILED ) ; + +--- a/xinetd/main.c 2018-05-04 10:02:11.999315632 +0200 ++++ b/xinetd/main.c 2018-05-04 10:03:44.124500979 +0200 +@@ -296,6 +296,7 @@ static void find_bad_fd(void) + SVC_ID( sp ) ) ; + svc_deactivate( sp ) ; + found = TRUE ; ++ bad_fd_count++ ; + break ; + } + } +@@ -303,6 +304,7 @@ static void find_bad_fd(void) + { + #ifdef HAVE_POLL + ps.rws.pfd_array[fd].events = 0; ++ ps.rws.pfd_array[fd].fd = -1; + #else + FD_CLR( fd, &ps.rws.socket_mask ) ; + #endif diff --git a/SPECS/xinetd.spec b/SPECS/xinetd.spec index 58ffb24..f6ad83b 100644 --- a/SPECS/xinetd.spec +++ b/SPECS/xinetd.spec @@ -1,7 +1,7 @@ Summary: A secure replacement for inetd Name: xinetd Version: 2.3.15 -Release: 13%{?dist} +Release: 14%{?dist} License: xinetd Group: System Environment/Daemons Epoch: 2 @@ -61,6 +61,7 @@ Patch29: xinetd-2.3.15-creds.patch Patch30: xinetd-2.3.15-tcpmux-nameinargs-disable-service.patch # Fix #1147538 - modify the xinetd man page to make it more clear on what happens to services on xinetd reload Patch31: xinetd-2.3.15-man-reload.patch +Patch32: xinetd-2.3.15-udp-wait.patch BuildRequires: autoconf, automake BuildRequires: libselinux-devel >= 1.30 @@ -119,6 +120,7 @@ located in the /etc/xinetd.d directory. %patch29 -p1 -b .creds %patch30 -p1 %patch31 -p1 +%patch32 -p1 aclocal autoconf @@ -166,6 +168,9 @@ install -m 600 %SOURCE3 $RPM_BUILD_ROOT/etc/sysconfig/xinetd %{_mandir}/*/* %changelog +* Wed Jul 31 2019 Jan Synáček - 2:2.3.15-14 +- fix xinetd infinite busy loop when datagram service has wait=yes (#1567227) + * Thu Mar 3 2016 Jan Synáček - 2:2.3.15-13 - modify the xinetd man page to make it more clear on what happens to services on xinetd reload (#1147538)