* ikiwiki-mass-rebuild: Patch from HenrikBrixAndersen to fix order
authorJoey Hess <joey@kodama.kitenet.net>
Fri, 26 Oct 2007 03:12:23 +0000 (23:12 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Fri, 26 Oct 2007 03:12:23 +0000 (23:12 -0400)
* ikiwiki-mass-rebuild: Don't clear PATH from the environment.

debian/changelog
doc/bugs/ikiwiki-mass-rebuild_fails_to_drop_privileges_and_execute_ikiwiki.mdwn
ikiwiki-mass-rebuild

index 8cca887809586f27dac6c418a7a20602c87b56ea..428339e70f6e273974a98b800cf2cd1e4b1dfec6 100644 (file)
@@ -16,10 +16,11 @@ ikiwiki (2.11) UNRELEASED; urgency=low
   * Add handling of feeds for nested inlines, as well as support for a
     single page containing two different feeds.
   * Also fixed some places in inline that failed to use destpage correctly.
   * Add handling of feeds for nested inlines, as well as support for a
     single page containing two different feeds.
   * Also fixed some places in inline that failed to use destpage correctly.
-  * ikiwiki-mass-rebuild: Patch from HenrikBrixAndersen to fix order 
+  * ikiwiki-mass-rebuild: Patch from HenrikBrixAndersen to fix order
     of permissions dropping code to work on FreeBSD.
     of permissions dropping code to work on FreeBSD.
+  * ikiwiki-mass-rebuild: Don't clear PATH from the environment.
 
 
- -- Joey Hess <joeyh@debian.org>  Thu, 25 Oct 2007 07:52:43 -0400
+ -- Joey Hess <joeyh@debian.org>  Thu, 25 Oct 2007 23:11:13 -0400
 
 ikiwiki (2.10) unstable; urgency=low
 
 
 ikiwiki (2.10) unstable; urgency=low
 
index 9bf6134bf25ba9b3a2ebf4749d10af8fca001e64..2eaca76323c67e184c5ebb5dd76a6a8e8ec259e5 100644 (file)
@@ -6,6 +6,8 @@ The solution is to set the effective UID after setting the real UID, and to set
 
 > > It doesn't - it needs to be set. The line with `%ENV=();` clears the environment, thus no `$PATH` is set. --[[HenrikBrixAndersen]]
 
 
 > > It doesn't - it needs to be set. The line with `%ENV=();` clears the environment, thus no `$PATH` is set. --[[HenrikBrixAndersen]]
 
+> > > I guess it shouldn't clear it then. Both [[done]] --[[Joey]]
+
 Proposed patch:
 
     --- ikiwiki-mass-rebuild.orig      2007-08-15 22:21:59.000000000 +0200
 Proposed patch:
 
     --- ikiwiki-mass-rebuild.orig      2007-08-15 22:21:59.000000000 +0200
index fa8bd913db1844e793062052379248e4612ef2fd..1ec90b3c0d34e05dd6092e542523e0bf6d81646a 100755 (executable)
@@ -27,8 +27,10 @@ sub processline {
                if ($< != $uuid || $> != $uuid || $( != $ugid || $) ne "$ugid $ugid") {
                        die "failed to drop permissions to $user";
                }
                if ($< != $uuid || $> != $uuid || $( != $ugid || $) ne "$ugid $ugid") {
                        die "failed to drop permissions to $user";
                }
-               %ENV=();
-               $ENV{HOME}=(getpwnam($user))[7];
+               %ENV=(
+                       PATH => $ENV{PATH},
+                       HOME => (getpwnam($user))[7],
+               );
                exec("ikiwiki", "-setup", $setup, @ARGV);
                die "failed to run ikiwiki: $!";
        }
                exec("ikiwiki", "-setup", $setup, @ARGV);
                die "failed to run ikiwiki: $!";
        }