diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-02-10 15:34:15 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-02-10 15:34:15 +0100 |
commit | 442581ed73847ba8ea34e7de4cd70eca3fd1d7bf (patch) | |
tree | f0c342aa333b746b75c99aa1c2bd3d80fd84d0d5 | |
parent | 16ec20d5c19dbcd76bbc6705292e7ea1b63f7bbf (diff) | |
download | rvnit-442581ed73847ba8ea34e7de4cd70eca3fd1d7bf.tar.gz rvnit-442581ed73847ba8ea34e7de4cd70eca3fd1d7bf.tar.xz rvnit-442581ed73847ba8ea34e7de4cd70eca3fd1d7bf.zip |
set umask to 0022 when pid 1
This is kernel default for init, but may not be in a container.
-rw-r--r-- | rvnit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rvnit.c b/rvnit.c index 4389477..fcc83f1 100644 --- a/rvnit.c +++ b/rvnit.c @@ -752,6 +752,7 @@ main(int argc, char *argv[]) pid1 = real_pid1 = (getpid() == 1); if (pid1) { + umask(0022); setenv("PATH", "/usr/bin:/usr/sbin", 0); init_mount(); own_console(); |