diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-09-05 16:14:30 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-09-05 16:14:30 +0200 |
commit | b86774de65406bf8b8daed92a0a994fdc8225a4e (patch) | |
tree | 0882eaa05af9340ae2b8d94add43fe973d64c8ff /main.c | |
parent | fa53571f2b1670383b4536540de35b732f973ac7 (diff) | |
download | rpcd-b86774de65406bf8b8daed92a0a994fdc8225a4e.tar.gz |
Set umask to 0077 on daemon startup to prevent libuci from making world-readable directories
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -77,6 +77,8 @@ int main(int argc, char **argv) if (stat("/var/run/rpcd", &s)) mkdir("/var/run/rpcd", 0700); + umask(0077); + signal(SIGPIPE, SIG_IGN); signal(SIGHUP, handle_signal); signal(SIGUSR1, handle_signal); |