diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2021-01-21 14:19:35 +0100 |
---|---|---|
committer | Christian Brauner <christian.brauner@ubuntu.com> | 2021-01-24 14:27:18 +0100 |
commit | b8b546a061884d98ba6ac6b4a0d1ee6566031cf5 (patch) | |
tree | a80128ab5b1ca411ff2ecfe60212a884663c16fd /net | |
parent | open: handle idmapped mounts in do_truncate() (diff) | |
download | linux-b8b546a061884d98ba6ac6b4a0d1ee6566031cf5.tar.xz linux-b8b546a061884d98ba6ac6b4a0d1ee6566031cf5.zip |
open: handle idmapped mounts
For core file operations such as changing directories or chrooting,
determining file access, changing mode or ownership the vfs will verify
that the caller is privileged over the inode. Extend the various helpers
to handle idmapped mounts. If the inode is accessed through an idmapped
mount map it into the mount's user namespace. Afterwards the permissions
checks are identical to non-idmapped mounts. When changing file
ownership we need to map the uid and gid from the mount's user
namespace. If the initial user namespace is passed nothing changes so
non-idmapped mounts will see identical behavior as before.
Link: https://lore.kernel.org/r/20210121131959.646623-17-christian.brauner@ubuntu.com
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions