-
-enum {
- MOUNT_WHAT,
- MOUNT_WHERE,
- MOUNT_TYPE,
- MOUNT_OPTIONS,
- MOUNT_SKIP
-};
-
-static const char *table[] = {
- "proc", "/proc", "proc", "rw",
- "sysfs", "/sys", "sysfs", "rw",
- "devtmps", "/dev", "devtmpfs", "mode=755",
- "tmpfs", "/dev/shm", "tmpfs", "mode=1777",
- "devpts", "/dev/pts", "devpts", "rw",
- "cgroup", "/cgroup/debug", "cgroup", "debug",
- NULL
+#include "macro.h"
+#include "util.h"
+
+typedef struct MountPoint {
+ const char *what;
+ const char *where;
+ const char *type;
+ const char *options;
+ unsigned long flags;
+ bool fatal;
+} MountPoint;
+
+static const MountPoint mount_table[] = {
+ { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
+ { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
+ { "devtmps", "/dev", "devtmpfs", "mode=755", MS_NOSUID, true },
+ { "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
+ { "devpts", "/dev/pts", "devpts", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
+ { "cgroup", "/cgroup/debug", "cgroup", "debug", MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
+ { "debugfs", "/sys/kernel/debug", "debugfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
+ { "binfmt_misc", "/proc/sys/fs/binfmt_misc", "binfmt_misc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
+ { "mqueue", "/dev/mqueue", "mqueue", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false },