]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: Add a mount flag to lock read only bind mounts
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 22 Mar 2013 10:10:15 +0000 (03:10 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 27 Mar 2013 14:50:04 +0000 (07:50 -0700)
commit981c83a2aa0cdd7872f7e39b4fde46d4569c1e3e
treeaa8528c1c23dccbeca409059ec5f5d21ca1318bf
parent6cd3ce318402e15412764caa8b2e16f6127083b7
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>
fs/namespace.c
include/linux/mount.h