-enum {
- MOUNT_WHAT,
- MOUNT_WHERE,
- MOUNT_TYPE,
- MOUNT_OPTIONS,
- MOUNT_SKIP
-};
-
-static const char *table[] = {
- "proc", "/proc", "proc", NULL,
- "sysfs", "/sys", "sysfs", NULL,
- "devtmps", "/dev", "devtmpfs", "mode=755,noexec,nosuid",
- "tmpfs", "/dev/shm", "tmpfs", "mode=1777,nodev,noexec,nosuid",
- "devpts", "/dev/pts", "devpts", NULL,
- "cgroup", "/cgroup/debug", "cgroup", "debug",
- "debugfs", "/sys/kernel/debug", "debugfs", NULL,
+typedef struct MountPoint {
+ const char *what;
+ const char *where;
+ const char *type;
+ const char *options;
+ unsigned long flags;
+} MountPoint;
+
+static const MountPoint mount_table[] = {
+ { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV },
+ { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV },
+ { "devtmps", "/dev", "devtmpfs", "mode=755", MS_NOSUID },
+ { "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NOEXEC|MS_NODEV },
+ { "devpts", "/dev/pts", "devpts", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV },
+ { "cgroup", "/cgroup/debug", "cgroup", "debug", MS_NOSUID|MS_NOEXEC|MS_NODEV },
+ { "debugfs", "/sys/kernel/debug", "debugfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV }