mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 13:47:41 +00:00
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:
parent
f66af38b49
commit
4bbb9c5793
@ -793,6 +793,10 @@ static int setup_mount(const char *name)
|
|||||||
|
|
||||||
if (hasmntopt(mntent, "bind"))
|
if (hasmntopt(mntent, "bind"))
|
||||||
mntflags |= MS_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,
|
if (mount(mntent->mnt_fsname, mntent->mnt_dir,
|
||||||
mntent->mnt_type, mntflags, NULL)) {
|
mntent->mnt_type, mntflags, NULL)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user