From: dlezcano Date: Tue, 25 Nov 2008 16:57:24 +0000 (+0000) Subject: Add more options for the mount points X-Git-Tag: lxc_0_5_0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bbb9c579336129038f6eb947bcc323d314764f3;p=thirdparty%2Flxc.git 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 --- 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)) {