]> git.baikalelectronics.ru Git - kernel.git/commit
fs/mount_setattr: tighten permission checks
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 11 May 2021 14:30:15 +0000 (16:30 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 12 May 2021 12:13:16 +0000 (14:13 +0200)
commit74e58daa01c9714fd7d2267a0a8bd833d46fd9f8
tree730c43aa2706393f338200da6eb1ba333487d244
parent78f0a5f86683713bf30eae653c023ab078a37264
fs/mount_setattr: tighten permission checks

We currently don't have any filesystems that support idmapped mounts
which are mountable inside a user namespace. That was a deliberate
decision for now as a userns root can just mount the filesystem
themselves. So enforce this restriction explicitly until there's a real
use-case for this. This way we can notice it and will have a chance to
adapt and audit our translation helpers and fstests appropriately if we
need to support such filesystems.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@vger.kernel.org
CC: linux-fsdevel@vger.kernel.org
Suggested-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
fs/namespace.c