diff options
| author | Roy Marples <roy@marples.name> | 2007-06-26 08:47:46 +0000 | 
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2007-06-26 08:47:46 +0000 | 
| commit | 0575c15993403532d96920ae443655a2deb5393e (patch) | |
| tree | 85da093be502a8924723bedb381b4d4c4808b70d | |
| parent | 75f776732bdab9d8f76fc6a47dd5008ed7e0fd50 (diff) | |
| download | openrc-0575c15993403532d96920ae443655a2deb5393e.tar.xz | |
Change pwd to / for all init scripts, #181224.
| -rw-r--r-- | ChangeLog | 1 | ||||
| -rw-r--r-- | src/runscript.c | 3 | 
2 files changed, 4 insertions, 0 deletions
| @@ -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) { | 
