evm: Pass user namespace to set/remove xattr hooks
authorRoberto Sassu <roberto.sassu@huawei.com>
Fri, 14 May 2021 15:27:48 +0000 (17:27 +0200)
committerMimi Zohar <zohar@linux.ibm.com>
Fri, 21 May 2021 16:57:52 +0000 (12:57 -0400)
commit7e135dc725417ecc0629afb4b3b24457d2a4869d
tree896e2f46d532e12fcfbbe3d6c8eff9bb484017cd
parentcdef685be5b4ae55c3959289e72d520402839c29
evm: Pass user namespace to set/remove xattr hooks

In preparation for 'evm: Allow setxattr() and setattr() for unmodified
metadata', this patch passes mnt_userns to the inode set/remove xattr hooks
so that the GID of the inode on an idmapped mount is correctly determined
by posix_acl_update_mode().

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
include/linux/evm.h
security/integrity/evm/evm_main.c
security/security.c