mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
security: allow finer granularity in permitting copy-up of security xattrs
Copying up xattrs is solely based on the security xattr name. For finer granularity add a dentry parameter to the security_inode_copy_up_xattr hook definition, allowing decisions to be based on the xattr content as well. Co-developed-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Acked-by: Amir Goldstein <amir73il@gmail.com> Acked-by: Paul Moore <paul@paul-moore.com> (LSM,SELinux) Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
committed by
Mimi Zohar
parent
c21632b668
commit
3253804773
@@ -946,7 +946,7 @@ static void evm_inode_post_setattr(struct mnt_idmap *idmap,
|
||||
evm_update_evmxattr(dentry, NULL, NULL, 0);
|
||||
}
|
||||
|
||||
static int evm_inode_copy_up_xattr(const char *name)
|
||||
static int evm_inode_copy_up_xattr(struct dentry *src, const char *name)
|
||||
{
|
||||
if (strcmp(name, XATTR_NAME_EVM) == 0)
|
||||
return 1; /* Discard */
|
||||
|
||||
Reference in New Issue
Block a user