• Christian Brauner's avatar
    fs/mount_setattr: tighten permission checks · 2ca4dcc4
    Christian Brauner authored
    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: default avatarSeth Forshee <seth.forshee@canonical.com>
    Signed-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
    2ca4dcc4
namespace.c 108 KB