diff options
| author | 2020-07-20 09:43:40 +0200 | |
|---|---|---|
| committer | 2020-07-20 09:43:40 +0200 | |
| commit | c4d41d00552754cc8cdd66a52da9b7c203884d49 (patch) | |
| tree | 60be0f3d543ad6d300a033d91dc313bc595cd737 /security/security.c | |
| parent | hpilo: Replace one-element array with flexible-array member (diff) | |
| parent | Linux 5.8-rc6 (diff) | |
| download | wireguard-linux-c4d41d00552754cc8cdd66a52da9b7c203884d49.tar.xz wireguard-linux-c4d41d00552754cc8cdd66a52da9b7c203884d49.zip | |
Merge v5.8-rc6 into char-misc-next
We need the char/misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security/security.c')
| -rw-r--r-- | security/security.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/security/security.c b/security/security.c index 0ce3e73edd42..70a7ad357bc6 100644 --- a/security/security.c +++ b/security/security.c @@ -1414,7 +1414,22 @@ EXPORT_SYMBOL(security_inode_copy_up); int security_inode_copy_up_xattr(const char *name) { - return call_int_hook(inode_copy_up_xattr, -EOPNOTSUPP, name); + struct security_hook_list *hp; + int rc; + + /* + * The implementation can return 0 (accept the xattr), 1 (discard the + * xattr), -EOPNOTSUPP if it does not know anything about the xattr or + * any other error code incase of an error. + */ + hlist_for_each_entry(hp, + &security_hook_heads.inode_copy_up_xattr, list) { + rc = hp->hook.inode_copy_up_xattr(name); + if (rc != LSM_RET_DEFAULT(inode_copy_up_xattr)) + return rc; + } + + return LSM_RET_DEFAULT(inode_copy_up_xattr); } EXPORT_SYMBOL(security_inode_copy_up_xattr); |
