diff options
author | Micah Morton <mortonm@chromium.org> | 2019-01-08 01:10:53 +0100 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2019-01-10 23:16:06 +0100 |
commit | c1a85a00ea66cb6f0bd0f14e47c28c2b0999799f (patch) | |
tree | 310c082e0b41d2d3ff8b619553ed5e45ad244862 /security/apparmor/resource.c | |
parent | Merge tag 'blob-stacking-security-next' of https://git.kernel.org/pub/scm/lin... (diff) | |
download | linux-c1a85a00ea66cb6f0bd0f14e47c28c2b0999799f.tar.xz linux-c1a85a00ea66cb6f0bd0f14e47c28c2b0999799f.zip |
LSM: generalize flag passing to security_capable
This patch provides a general mechanism for passing flags to the
security_capable LSM hook. It replaces the specific 'audit' flag that is
used to tell security_capable whether it should log an audit message for
the given capability check. The reason for generalizing this flag
passing is so we can add an additional flag that signifies whether
security_capable is being called by a setid syscall (which is needed by
the proposed SafeSetID LSM).
Signed-off-by: Micah Morton <mortonm@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: James Morris <james.morris@microsoft.com>
Diffstat (limited to 'security/apparmor/resource.c')
-rw-r--r-- | security/apparmor/resource.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/resource.c b/security/apparmor/resource.c index 95fd26d09757..552ed09cb47e 100644 --- a/security/apparmor/resource.c +++ b/security/apparmor/resource.c @@ -124,7 +124,7 @@ int aa_task_setrlimit(struct aa_label *label, struct task_struct *task, */ if (label != peer && - aa_capable(label, CAP_SYS_RESOURCE, SECURITY_CAP_NOAUDIT) != 0) + aa_capable(label, CAP_SYS_RESOURCE, CAP_OPT_NOAUDIT) != 0) error = fn_for_each(label, profile, audit_resource(profile, resource, new_rlim->rlim_max, peer, |