[PATCH v4 17/23] security: Introduce inode_post_remove_acl hook
Mimi Zohar
zohar at linux.ibm.com
Mon Nov 6 16:34:03 UTC 2023
On Fri, 2023-10-27 at 10:35 +0200, Roberto Sassu wrote:
> diff --git a/security/security.c b/security/security.c
> index 622c24cbfbb6..6ca8fdd1f037 100644
> --- a/security/security.c
> +++ b/security/security.c
> @@ -2406,6 +2406,23 @@ int security_inode_remove_acl(struct mnt_idmap *idmap,
> return evm_inode_remove_acl(idmap, dentry, acl_name);
> }
>
> +/**
> + * security_inode_post_remove_acl() - Update inode sec after remove_acl op
"remove_acl op" doesn't add any additional information. Both here and
in "security: Introduce inode_post_set_acl hook" the comment should be
the same.
> + * @idmap: idmap of the mount
> + * @dentry: file
> + * @acl_name: acl name
> + *
> + * Update inode security field after successful remove_acl operation on @dentry
> + * in @idmap. The posix acls are identified by @acl_name.
> + */
> +void security_inode_post_remove_acl(struct mnt_idmap *idmap,
> + struct dentry *dentry, const char *acl_name)
> +{
> + if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
> + return;
> + call_void_hook(inode_post_remove_acl, idmap, dentry, acl_name);
> +}
> +
> /**
> * security_inode_post_setxattr() - Update the inode after a setxattr operation
> * @dentry: file
--
thanks,
Mimi
More information about the Linux-security-module-archive
mailing list