aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorChristian Brauner <[email protected]>2021-01-21 13:19:34 +0000
committerChristian Brauner <[email protected]>2021-01-24 13:27:18 +0000
commit643fe55a0679ae5582a1a2a1df86dc240292cd1b (patch)
tree48f1b5b8ed624ca70008a8ec9b82147a60e2865c /net/unix/af_unix.c
parentnamei: prepare for idmapped mounts (diff)
downloadkernel-643fe55a0679ae5582a1a2a1df86dc240292cd1b.tar.gz
kernel-643fe55a0679ae5582a1a2a1df86dc240292cd1b.zip
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/[email protected] Cc: Christoph Hellwig <[email protected]> Cc: David Howells <[email protected]> Cc: Al Viro <[email protected]> Cc: [email protected] Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions