diff --git a/xinetd-2.3.14-leaking-fds-2.patch b/xinetd-2.3.14-leaking-fds-2.patch new file mode 100644 index 0000000..13cb163 --- /dev/null +++ b/xinetd-2.3.14-leaking-fds-2.patch @@ -0,0 +1,18 @@ +--- xinetd-2.3.14/xinetd/service.c 2012-03-02 09:04:28.678977503 +0100 ++++ xinetd-2.3.14-mod/xinetd/service.c 2012-03-02 09:05:42.542941099 +0100 +@@ -372,6 +372,7 @@ status_e svc_activate( struct service *s + if ( set_fd_modes( sp ) == FAILED ) + { + (void) Sclose( SVC_FD(sp) ) ; ++ sp->svc_pfd_index = --ps.rws.pfds_last; + return( FAILED ) ; + } + +@@ -385,6 +386,7 @@ status_e svc_activate( struct service *s + if ( status == FAILED ) + { + (void) Sclose( SVC_FD(sp) ) ; ++ sp->svc_pfd_index = --ps.rws.pfds_last; + return( FAILED ) ; + } + diff --git a/xinetd.spec b/xinetd.spec index e19bc9b..b654669 100644 --- a/xinetd.spec +++ b/xinetd.spec @@ -1,7 +1,7 @@ Summary: A secure replacement for inetd Name: xinetd Version: 2.3.14 -Release: 41%{?dist} +Release: 42%{?dist} License: xinetd Group: System Environment/Daemons Epoch: 2 @@ -51,6 +51,8 @@ Patch21: xinetd-2.3.14-leaking-fds.patch Patch22: xinetd-2.3.14-many-services.patch # Remove realloc of fds that was causing memory corruption Patch23: xinetd-2.3.14-realloc-remove.patch +# Fix leaking descriptor when starting a service fails +Patch24: xinetd-2.3.14-leaking-fds-2.patch BuildRequires: autoconf, automake BuildRequires: libselinux-devel >= 1.30 @@ -106,6 +108,7 @@ located in the /etc/xinetd.d directory. %patch21 -p1 -b .leaking-fds %patch22 -p1 -b .many-services %patch23 -p1 -b .realloc-remove +%patch24 -p1 -b .leaking-fds-2 aclocal autoconf @@ -175,6 +178,9 @@ fi %{_mandir}/*/* %changelog +* Fri Mar 02 2012 Jan Synáček - 2:2.3.14-42 +- Fix leaking descriptor when starting a service fails (#795188) + * Wed Jan 18 2012 Jan Synáček - 2:2.3.14-41 - Remove realloc inside svc_activate that was causing memory corruption - Number of alloc'd file descriptors is now determined by system limits (ulimit -n)