]> git.baikalelectronics.ru Git - kernel.git/commit
mnt: Simplify mount_too_revealing
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 15 Jun 2016 11:59:49 +0000 (06:59 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 23 Jun 2016 20:41:57 +0000 (15:41 -0500)
commit711f6f8ac89ed0f0f00cf4e3460b6a364c3ee747
tree1906ee4f4cacd1d769b947e3d81460404ecceffd
parent1bb39dcdd8bf210480e91ada54a5d987de9fb47f
mnt: Simplify mount_too_revealing

Verify all filesystems that we check in mount_too_revealing set
SB_I_NOEXEC and SB_I_NODEV in sb->s_iflags.  That is true for today
and it should remain true in the future.

Remove the now unnecessary checks from mnt_already_visibile that
ensure MNT_LOCK_NOSUID, MNT_LOCK_NOEXEC, and MNT_LOCK_NODEV are
preserved.  Making the code shorter and easier to read.

Relying on SB_I_NOEXEC and SB_I_NODEV instead of the user visible
MNT_NOSUID, MNT_NOEXEC, and MNT_NODEV ensures the many current
systems where proc and sysfs are mounted with "nosuid, nodev, noexec"
and several slightly buggy container applications don't bother to
set those flags continue to work.

Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/namespace.c