]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lsm: Refactor return value of LSM hook inode_copy_up_xattr
authorXu Kuohai <xukuohai@huawei.com>
Wed, 24 Jul 2024 02:06:59 +0000 (10:06 +0800)
committerPaul Moore <paul@paul-moore.com>
Wed, 31 Jul 2024 18:47:09 +0000 (14:47 -0400)
commit924e19c39e8f0bbd581ab8a049f95a0ed02235b1
tree19035cdf88e11452b06828295b4cd4b372d46fd6
parentbe72a57527fde6c80061c5f9d0e28762eb817b03
lsm: Refactor return value of LSM hook inode_copy_up_xattr

To be consistent with most LSM hooks, convert the return value of
hook inode_copy_up_xattr to 0 or a negative error code.

Before:
- Hook inode_copy_up_xattr returns 0 when accepting xattr, 1 when
  discarding xattr, -EOPNOTSUPP if it does not know xattr, or any
  other negative error code otherwise.

After:
- Hook inode_copy_up_xattr returns 0 when accepting xattr, *-ECANCELED*
  when discarding xattr, -EOPNOTSUPP if it does not know xattr, or
  any other negative error code otherwise.

Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
fs/overlayfs/copy_up.c
security/integrity/evm/evm_main.c
security/security.c
security/selinux/hooks.c
security/smack/smack_lsm.c