[Pkg-sysvinit-commits] r1323 - in sysvinit/trunk/debian: . startpar

kelmo-guest at alioth.debian.org kelmo-guest at alioth.debian.org
Fri Mar 13 18:10:24 UTC 2009


Author: kelmo-guest
Date: 2009-03-13 18:10:24 +0000 (Fri, 13 Mar 2009)
New Revision: 1323

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/startpar/makeboot.c
Log:
Apply patch from Werner Fink to fix file descriptor leak in startpar
when using posix_fadvise feature.

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2009-02-02 14:48:59 UTC (rev 1322)
+++ sysvinit/trunk/debian/changelog	2009-03-13 18:10:24 UTC (rev 1323)
@@ -8,6 +8,8 @@
     compatibility patch (sent upstream). Also workaround /dev/pts not
     being mounted early in runlevel S by having startpar use an own
     version of getpt(2) system call. Closes: #457896, #484883
+  * Apply patch from Werner Fink to fix file descriptor leak in startpar
+    when using posix_fadvise feature.
   * Enable CONCURRENCY=makefile mode in debian/sysv-rc/etc/init.d/rc.
     This mode uses startpar and the /etc/init.d/.depend.* makefile-like
     information created by insserv to calculate boot script execution
@@ -42,7 +44,7 @@
     /dev/ptmx manually because udev does this. Merged from 2.86.ds1-
     61ubuntu1.
 
- -- Kel Modderman <kel at otaku42.de>  Tue, 03 Feb 2009 00:46:24 +1000
+ -- Kel Modderman <kel at otaku42.de>  Sat, 14 Mar 2009 04:08:15 +1000
 
 sysvinit (2.86.ds1-61) unstable; urgency=low
 

Modified: sysvinit/trunk/debian/startpar/makeboot.c
===================================================================
--- sysvinit/trunk/debian/startpar/makeboot.c	2009-02-02 14:48:59 UTC (rev 1322)
+++ sysvinit/trunk/debian/startpar/makeboot.c	2009-03-13 18:10:24 UTC (rev 1323)
@@ -274,8 +274,10 @@
 #endif
 	ndirs = scandir(path, &dirlist, dirfilter, alphasort);
 #if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600
-	if (i >= 0)
+	if (i >= 0) {
 		(void)posix_fadvise(i, 0, 0, POSIX_FADV_DONTNEED);
+		close(i);
+	}
 #endif
 	/* mark all matching nodes */
 	if (ndirs >= 0) {




More information about the Pkg-sysvinit-commits mailing list