]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
vfs: move cap_convert_nscap() call into vfs_setxattr()
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 14 Dec 2020 14:26:13 +0000 (15:26 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 14 Dec 2020 14:26:13 +0000 (15:26 +0100)
commit7c03e2cda4a584cadc398e8f6641ca9988a39d52
treefb00450cfbec40734c00495f1715fdf4d8b2d873
parentc11faf32599fee59f33896c8d59f9b3c17ca76fc
vfs: move cap_convert_nscap() call into vfs_setxattr()

cap_convert_nscap() does permission checking as well as conversion of the
xattr value conditionally based on fs's user-ns.

This is needed by overlayfs and probably other layered fs (ecryptfs) and is
what vfs_foo() is supposed to do anyway.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Acked-by: James Morris <jamorris@linux.microsoft.com>
fs/xattr.c
include/linux/capability.h
security/commoncap.c