]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 16:26:01 +0000 (09:26 -0700)
commit2f8d2ffe267ddb8d28dbed0ebb2d8dcf47c629fd
treeb7ade27e695ed1369b362441bdda7b9eaa196f94
parent7f60ac1533f522fe257dca74fbb4c4d3820a9b0f
vfs: Add a mount flag to lock read only bind mounts

commit 90563b198e4c6674c63672fae1923da467215f45 upstream.

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.

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/namespace.c
include/linux/mount.h