From: Etienne CHAMPETIER Date: Thu, 8 Oct 2015 20:01:44 +0000 (+0000) Subject: jail: Add MS_NODEV MS_NOEXEC MS_NOSUID mount options where needed X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ef490722885a5c708c70dff656d094c7043ae081;p=oweals%2Fprocd.git jail: Add MS_NODEV MS_NOEXEC MS_NOSUID mount options where needed this completes fafbf7338ec8304f2a0ec0ba76048fba2c01c07e Signed-off-by: Etienne CHAMPETIER --- diff --git a/jail/jail.c b/jail/jail.c index f459a5e..56dc9ca 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -193,11 +193,11 @@ static int build_jail_fs() rmdir("/old"); if (opts.procfs) { mkdir("/proc", 0755); - mount("proc", "/proc", "proc", MS_NOATIME, 0); + mount("proc", "/proc", "proc", MS_NOATIME | MS_NODEV | MS_NOEXEC | MS_NOSUID, 0); } if (opts.sysfs) { mkdir("/sys", 0755); - mount("sysfs", "/sys", "sysfs", MS_NOATIME, 0); + mount("sysfs", "/sys", "sysfs", MS_NOATIME | MS_NODEV | MS_NOEXEC | MS_NOSUID, 0); } if (opts.ronly) mount(NULL, "/", NULL, MS_RDONLY | MS_REMOUNT, 0);