]> git.baikalelectronics.ru Git - 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)
commita954acd623cef6ab670ef4c74aebaf09952949e1
treefb00450cfbec40734c00495f1715fdf4d8b2d873
parentb689ad0f20e146ae285b0b632bb29e25833b1ec2
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