diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2020-07-08 11:38:59 +0200 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2020-07-08 11:38:59 +0200 |
| commit | faa2fd7cbad4609d06d7904c0a80cf2f8cd23678 (patch) | |
| tree | 3a5bfcc8879b719aec97cb73ed6e020cde502546 /security/security.c | |
| parent | 01e377c539ca52a6c753d0fdbe93b3b8fcd66a1c (diff) | |
| parent | ce3614daabea8a2d01c1dd17ae41d1ec5e5ae7db (diff) | |
Merge branch 'sched/urgent'
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); |
