Skip to content

Commit

Permalink
Always set the umask (0 is a valid umask value).
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesage committed Oct 22, 2022
1 parent 052aaa7 commit 0b8a495
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/cinit/cinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,9 +997,7 @@ static pid_t fork_and_exec(int service)
}

// Set umask.
if (SRV(service).umask != 0) {
umask(SRV(service).umask);
}
umask(SRV(service).umask);

// Set SGIDs.
if (setgroups(SRV(service).sgid_list_size, SRV(service).sgid_list) < 0) {
Expand Down

0 comments on commit 0b8a495

Please sign in to comment.