Commit 4bbb9c57 by dlezcano

Add more options for the mount points

From: Daniel Lezcano <dlezcano@fr.ibm.com> Add the readonly and noexec options for the mount points. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent f66af38b
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment