[Initscripts-ng-commits] r775 - in /branches/insserv-1.11.9/debian: changelog patches/80_do_not_mangle_argv_pointer.patch patches/series

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Mon Jul 14 10:28:59 UTC 2008


Author: kelmo-guest
Date: Mon Jul 14 10:28:58 2008
New Revision: 775

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=775
Log:
Add 80_do_not_mangle_argv_pointer.patch to revert optimisation that
modifies argv pointer and causes chkfor() function to be impotent
thereafter, completely wrecking the test suite.

Added:
    branches/insserv-1.11.9/debian/patches/80_do_not_mangle_argv_pointer.patch
Modified:
    branches/insserv-1.11.9/debian/changelog
    branches/insserv-1.11.9/debian/patches/series

Modified: branches/insserv-1.11.9/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/branches/insserv-1.11.9/debian/changelog?rev=775&op=diff
==============================================================================
--- branches/insserv-1.11.9/debian/changelog (original)
+++ branches/insserv-1.11.9/debian/changelog Mon Jul 14 10:28:58 2008
@@ -31,8 +31,11 @@
     accordingly. Build-Depend on quilt.
   * Add 70_test_suite_failed_count.patch to close delta between SUSE and
     Debian common test suite shlib.
-
- -- Kel Modderman <kel at otaku42.de>  Mon, 14 Jul 2008 13:35:00 +1000
+  * Add 80_do_not_mangle_argv_pointer.patch to revert optimisation that
+    modifies argv pointer and causes chkfor() function to be impotent
+    thereafter, completely wrecking the test suite.
+
+ -- Kel Modderman <kel at otaku42.de>  Mon, 14 Jul 2008 20:27:02 +1000
 
 insserv (1.11.0-9) unstable; urgency=low
 

Added: branches/insserv-1.11.9/debian/patches/80_do_not_mangle_argv_pointer.patch
URL: http://svn.debian.org/wsvn/initscripts-ng/branches/insserv-1.11.9/debian/patches/80_do_not_mangle_argv_pointer.patch?rev=775&op=file
==============================================================================
--- branches/insserv-1.11.9/debian/patches/80_do_not_mangle_argv_pointer.patch (added)
+++ branches/insserv-1.11.9/debian/patches/80_do_not_mangle_argv_pointer.patch Mon Jul 14 10:28:58 2008
@@ -1,0 +1,38 @@
+Do not modify argv via pointers, it breaks chkfor().
+---
+--- a/insserv.c
++++ b/insserv.c
+@@ -2307,24 +2307,24 @@
+ 	}
+ 
+ 	if (S_ISDIR(st_script.st_mode)) {
+-	    const size_t l = strlen(*argv) - 1;
++	    const size_t l = strlen(*argv);
+ 
+-	    path = *argv;
+-	    if (*(path+l) == '/')
+-		*(path+l) = '\0';
++	    path = xstrdup(*argv);
++	    if (path[l-1] == '/')
++		path[l-1] = '\0';
+ 
+ 	    argv++;
+ 	    argc--;
+ 	    if (argc || del)
+ 		error("usage: %s [[-r] init_script|init_directory]\n", myname);
+-
+ 	} else {
+-	    char * base;
++	    char * base, * ptr = xstrdup(*argv);
+ 
+-	    if ((base = strrchr(*argv, '/'))) {
++	    if ((base = strrchr(ptr, '/'))) {
+ 		*base = '\0';
+-		path  = *argv;
+-	    }
++		path  = ptr;
++	    } else
++		free(ptr);
+ 	}
+     }
+ 

Modified: branches/insserv-1.11.9/debian/patches/series
URL: http://svn.debian.org/wsvn/initscripts-ng/branches/insserv-1.11.9/debian/patches/series?rev=775&op=diff
==============================================================================
--- branches/insserv-1.11.9/debian/patches/series (original)
+++ branches/insserv-1.11.9/debian/patches/series Mon Jul 14 10:28:58 2008
@@ -6,3 +6,4 @@
 63_warn_on_missing_default_fields.patch
 64_missing_default_fields_fallback.patch
 70_test_suite_failed_count.patch
+80_do_not_mangle_argv_pointer.patch




More information about the Initscripts-ng-commits mailing list