diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2021-01-21 14:19:34 +0100 |
---|---|---|
committer | Christian Brauner <christian.brauner@ubuntu.com> | 2021-01-24 14:27:18 +0100 |
commit | 643fe55a0679ae5582a1a2a1df86dc240292cd1b (patch) | |
tree | 48f1b5b8ed624ca70008a8ec9b82147a60e2865c /fs/d_path.c | |
parent | 6521f8917082928a4cb637eb64b77b5f2f5b30fc (diff) |
open: handle idmapped mounts in do_truncate()
When truncating files the vfs will verify that the caller is privileged
over the inode. Extend it to handle idmapped mounts. If the inode is
accessed through an idmapped mount it is mapped according to the mount's
user namespace. Afterwards the permissions checks are identical to
non-idmapped mounts. 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-16-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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'fs/d_path.c')
0 files changed, 0 insertions, 0 deletions