From 442581ed73847ba8ea34e7de4cd70eca3fd1d7bf Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 10 Feb 2022 15:34:15 +0100 Subject: set umask to 0022 when pid 1 This is kernel default for init, but may not be in a container. --- rvnit.c | 1 + 1 file changed, 1 insertion(+) 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(); -- cgit 1.4.1