Set umask to 0077 on daemon startup to prevent libuci from making world-readable directories
This commit is contained in:
parent
fa53571f2b
commit
b86774de65
1 changed files with 2 additions and 0 deletions
2
main.c
2
main.c
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue