aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-06-26 08:47:46 +0000
committerRoy Marples <roy@marples.name>2007-06-26 08:47:46 +0000
commit0575c15993403532d96920ae443655a2deb5393e (patch)
tree85da093be502a8924723bedb381b4d4c4808b70d
parent75f776732bdab9d8f76fc6a47dd5008ed7e0fd50 (diff)
Change pwd to / for all init scripts, #181224.
-rw-r--r--ChangeLog1
-rw-r--r--src/runscript.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ee19d377..4d51f1e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
26 Jun 2007; Roy Marples <uberlord@gentoo.org>:
--nocolor works again, #181011 thanks to Daniel Drake.
+ Change pwd to / for all init scripts, #181224.
21 Jun 2007; Mike Frysinger <vapier@gentoo.org>:
diff --git a/src/runscript.c b/src/runscript.c
index 50a1931e..18ee1ddd 100644
--- a/src/runscript.c
+++ b/src/runscript.c
@@ -977,6 +977,9 @@ int main (int argc, char **argv)
service = argv[1];
applet = rc_xstrdup (basename (service));
atexit (cleanup);
+
+ /* Change dir to / to ensure all init scripts don't use stuff in pwd */
+ chdir ("/");
/* Show help if insufficient args */
if (argc < 3) {