diff options
author | Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> | 2015-06-17 15:18:36 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-06-18 08:33:36 +0200 |
commit | 8559df08db51a2e5fe056e6a1c07984e51068eaf (patch) | |
tree | 858fed41651ccb3b6711756caf8725c31b577e1c /plug | |
parent | acb157e638aa93490ca84be381c28643d50d4e4a (diff) | |
download | unitd-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 'plug')
-rw-r--r-- | plug/coldplug.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plug/coldplug.c b/plug/coldplug.c index 49a2017..d3a607d 100644 --- a/plug/coldplug.c +++ b/plug/coldplug.c @@ -40,12 +40,14 @@ static void udevtrigger_complete(struct uloop_process *proc, int ret) void procd_coldplug(void) { char *argv[] = { "udevtrigger", NULL }; + unsigned int oldumask = umask(0); umount2("/dev/pts", MNT_DETACH); umount2("/dev/", MNT_DETACH); mount("tmpfs", "/dev", "tmpfs", 0, "mode=0755,size=512K"); mkdir("/dev/shm", 01777); mkdir("/dev/pts", 0755); + umask(oldumask); mount("devpts", "/dev/pts", "devpts", 0, 0); udevtrigger.cb = udevtrigger_complete; udevtrigger.pid = fork(); |