diff options
| author | Roy Marples <roy@marples.name> | 2009-02-10 23:11:17 +0000 | 
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-02-10 23:11:17 +0000 | 
| commit | 069590d97f0db855022cb0a6fa2cee8e410bdccd (patch) | |
| tree | 9c9f0e794a7baa36c0aaaaa887f316f59c22954b /src | |
| parent | 3fc17f59662316d23a4a102a8686e4e549426df7 (diff) | |
| download | openrc-069590d97f0db855022cb0a6fa2cee8e410bdccd.tar.xz | |
Fix unmask option, thanks to douglas@openplans.org, #146
Diffstat (limited to 'src')
| -rw-r--r-- | src/rc/start-stop-daemon.c | 9 | 
1 files changed, 2 insertions, 7 deletions
| diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index eb7490be..53de7bd2 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -653,8 +653,7 @@ int start_stop_daemon(int argc, char **argv)  	char line[130];  	FILE *fp;  	size_t len; -	bool setumask = false; -	mode_t numask; +	mode_t numask = 022;  	char **margv;  	unsigned int start_wait = 0; @@ -775,7 +774,6 @@ int start_stop_daemon(int argc, char **argv)  			if (parse_mode(&numask, optarg))  				eerrorx("%s: invalid mode `%s'",  					applet, optarg); -			setumask = true;  			break;  		case 'm':  /* --make-pidfile */ @@ -1041,8 +1039,7 @@ int start_stop_daemon(int argc, char **argv)  	/* Child process - lets go! */  	if (pid == 0) {  		pid_t mypid = getpid(); -		if (setumask) -			umask(numask); +		umask(numask);  #ifdef TIOCNOTTY  		tty_fd = open("/dev/tty", O_RDWR); @@ -1161,8 +1158,6 @@ int start_stop_daemon(int argc, char **argv)  			setenv("PATH", newpath, 1);  		} -		umask(022); -  		stdout_fd = devnull_fd;  		stderr_fd = devnull_fd;  		if (redirect_stdout) { | 
