summaryrefslogtreecommitdiffstats
path: root/initd
diff options
context:
space:
mode:
authorDaniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>2015-06-17 15:18:36 +0200
committerFelix Fietkau <nbd@openwrt.org>2015-06-18 08:33:36 +0200
commit8559df08db51a2e5fe056e6a1c07984e51068eaf (patch)
tree858fed41651ccb3b6711756caf8725c31b577e1c /initd
parentacb157e638aa93490ca84be381c28643d50d4e4a (diff)
downloadunitd-8559df08db51a2e5fe056e6a1c07984e51068eaf.tar
unitd-8559df08db51a2e5fe056e6a1c07984e51068eaf.zip
fix /dev/shm permissions, this time for real
Previous patch did not account for umask, now adding that. Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Diffstat (limited to 'initd')
-rw-r--r--initd/early.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/initd/early.c b/initd/early.c
index e57ea9d..3f9cf69 100644
--- a/initd/early.c
+++ b/initd/early.c
@@ -60,6 +60,8 @@ early_console(const char *dev)
static void
early_mounts(void)
{
+ unsigned int oldumask = umask(0);
+
mount("proc", "/proc", "proc", MS_NOATIME, 0);
mount("sysfs", "/sys", "sysfs", MS_NOATIME, 0);
mount("none", "/sys/fs/cgroup", "cgroup", 0, 0);
@@ -77,6 +79,7 @@ early_mounts(void)
mkdir("/tmp/run", 0777);
mkdir("/tmp/lock", 0777);
mkdir("/tmp/state", 0777);
+ umask(oldumask);
}
static void