]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Add more options for the mount points
authordlezcano <dlezcano>
Tue, 25 Nov 2008 16:57:24 +0000 (16:57 +0000)
committerdlezcano <dlezcano>
Tue, 25 Nov 2008 16:57:24 +0000 (16:57 +0000)
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Add the readonly and noexec options for the mount points.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_conf.c

index a3b052c88652c48b988e0d085495f43901a4a232..a6219ffe2ac585f4546948575b2bed8ca9d558bc 100644 (file)
@@ -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)) {