summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/init.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c
index 509dc2cb4..af6aefd2a 100644
--- a/mdk-stage1/init.c
+++ b/mdk-stage1/init.c
@@ -416,11 +416,17 @@ int main(int argc, char **argv)
fatal_error("Unable to mount proc filesystem");
if (mount("none", "/sys", "sysfs", 0, NULL))
fatal_error("Unable to mount sysfs filesystem");
- if (mount("none", "/sys/kernel/debug", "debugfs", 0, "mode=0755,nosuid"))
+ if (mount("none", "/sys/kernel/debug", "debugfs", MS_NOSUID, "mode=0755"))
fatal_error("Unable to mount debugfs filesystem");
if (mount("none", "/dev", "devtmpfs", 0, NULL))
fatal_error("Unable to mount dev filesystem");
- }
+ mkdir("/dev/pts", 0755);
+ if (mount("/dev/pts", "/dev/pts", "devpts", MS_NOSUID|MS_NOEXEC, "gid=5,mode=0620"))
+ fatal_error("Unable to mount /dev/pts devpts filesystem");
+ mkdir("/dev/shm", 0755);
+ if (mount("/dev/shm", "/dev/shm", "tmpfs", MS_NOSUID|MS_NODEV, "mode=1777"))
+ fatal_error("Unable to mount /dev/shm tmpfs filesystem");
+ }
/* ignore Control-C and keyboard stop signals */