[Initscripts-ng-commits] r855 - in /trunk/src/insserv/debian: changelog patches/00list patches/40_badboy_segfault.dpatch
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Fri Sep 12 08:14:27 UTC 2008
Author: kelmo-guest
Date: Fri Sep 12 08:14:27 2008
New Revision: 855
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=855
Log:
Add 40_badboy_segfault.dpatch to fix segfault when scriptname()
function of insserv does not return script name due to script in
runlevel directory not being a symlink (or corrupt). (Closes: #493202)
Added:
trunk/src/insserv/debian/patches/40_badboy_segfault.dpatch
Modified:
trunk/src/insserv/debian/changelog
trunk/src/insserv/debian/patches/00list
Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=855&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Fri Sep 12 08:14:27 2008
@@ -12,8 +12,11 @@
test.
* Add test_script_in_runlevel() function to expose segfault reported
in #493202.
-
- -- Kel Modderman <kel at otaku42.de> Fri, 12 Sep 2008 17:19:46 +1000
+ * Add 40_badboy_segfault.dpatch to fix segfault when scriptname()
+ function of insserv does not return script name due to script in
+ runlevel directory not being a symlink (or corrupt). (Closes: #493202)
+
+ -- Kel Modderman <kel at otaku42.de> Fri, 12 Sep 2008 18:13:32 +1000
insserv (1.12.0-2) unstable; urgency=low
Modified: trunk/src/insserv/debian/patches/00list
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/00list?rev=855&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/00list (original)
+++ trunk/src/insserv/debian/patches/00list Fri Sep 12 08:14:27 2008
@@ -1,3 +1,4 @@
10_nosuse
11_debian_conf
30_deterministic_order
+40_badboy_segfault
Added: trunk/src/insserv/debian/patches/40_badboy_segfault.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/40_badboy_segfault.dpatch?rev=855&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/40_badboy_segfault.dpatch (added)
+++ trunk/src/insserv/debian/patches/40_badboy_segfault.dpatch Fri Sep 12 08:14:27 2008
@@ -1,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 40_badboy_segfault.patch by Kel Modderman <kel at otaku42.de>
+##
+## DP: Purpose: Defend against corrupt or invalid scripts living in
+## DP: /etc/rc[S0-6].d/
+## DP: Fixes: #493202
+## DP: Status: Work in progress.
+
+ at DPATCH@
+--- a/insserv.c
++++ b/insserv.c
+@@ -1696,6 +1696,11 @@
+ }
+
+ lsb = scan_script_defaults(dfd, d->d_name, override_path, &name, true, ignore);
++ if (!name) {
++ warn("warning: script is corrupt or invalid: %s/%s%s\n", path, rcd, d->d_name);
++ continue;
++ }
++
+ if (!script_inf.provides || script_inf.provides == empty)
+ script_inf.provides = xstrdup(ptr);
+
More information about the Initscripts-ng-commits
mailing list