diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-03-22 03:10:15 -0700 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-03-27 07:50:04 -0700 |
commit | 90563b198e4c6674c63672fae1923da467215f45 (patch) | |
tree | aa8528c1c23dccbeca409059ec5f5d21ca1318bf /include/linux/mount.h | |
parent | 3151527ee007b73a0ebd296010f1c0454a919c7d (diff) |
vfs: Add a mount flag to lock read only bind mounts
When a read-only bind mount is copied from mount namespace in a higher
privileged user namespace to a mount namespace in a lesser privileged
user namespace, it should not be possible to remove the the read-only
restriction.
Add a MNT_LOCK_READONLY mount flag to indicate that a mount must
remain read-only.
CC: stable@vger.kernel.org
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/mount.h')
-rw-r--r-- | include/linux/mount.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mount.h b/include/linux/mount.h index d7029f4a191a..73005f9957ea 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h @@ -47,6 +47,8 @@ struct mnt_namespace; #define MNT_INTERNAL 0x4000 +#define MNT_LOCK_READONLY 0x400000 + struct vfsmount { struct dentry *mnt_root; /* root of the mounted tree */ struct super_block *mnt_sb; /* pointer to superblock */ |