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: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
dlezcano 2008-11-25 16:57:24 +00:00
parent f66af38b49
commit 4bbb9c5793

View 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)) {