From 4bbb9c579336129038f6eb947bcc323d314764f3 Mon Sep 17 00:00:00 2001 From: dlezcano Date: Tue, 25 Nov 2008 16:57:24 +0000 Subject: [PATCH] Add more options for the mount points From: Daniel Lezcano Add the readonly and noexec options for the mount points. Signed-off-by: Daniel Lezcano --- src/lxc/lxc_conf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c index a3b052c88..a6219ffe2 100644 --- a/src/lxc/lxc_conf.c +++ b/src/lxc/lxc_conf.c @@ -793,6 +793,10 @@ static int setup_mount(const char *name) if (hasmntopt(mntent, "bind")) mntflags |= MS_BIND; + if (hasmntopt(mntent, "ro")) + mntflags |= MS_RDONLY; + if (hasmntopt(mntent, "noexec")) + mntflags |= MS_NOEXEC; if (mount(mntent->mnt_fsname, mntent->mnt_dir, mntent->mnt_type, mntflags, NULL)) { -- 2.47.2