diff options
author | Micah Morton <mortonm@chromium.org> | 2019-01-08 03:10:53 +0300 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2019-01-11 01:16:06 +0300 |
commit | c1a85a00ea66cb6f0bd0f14e47c28c2b0999799f (patch) | |
tree | 310c082e0b41d2d3ff8b619553ed5e45ad244862 /security/apparmor/ipc.c | |
parent | 2233975cd7927672525361c4c6eebc0b8d018a74 (diff) | |
download | linux-c1a85a00ea66cb6f0bd0f14e47c28c2b0999799f.tar.xz |
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/ipc.c')
-rw-r--r-- | security/apparmor/ipc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/apparmor/ipc.c b/security/apparmor/ipc.c index 527ea1557120..aacd1e95cb59 100644 --- a/security/apparmor/ipc.c +++ b/security/apparmor/ipc.c @@ -107,7 +107,8 @@ static int profile_tracer_perm(struct aa_profile *tracer, aad(sa)->label = &tracer->label; aad(sa)->peer = tracee; aad(sa)->request = 0; - aad(sa)->error = aa_capable(&tracer->label, CAP_SYS_PTRACE, 1); + aad(sa)->error = aa_capable(&tracer->label, CAP_SYS_PTRACE, + CAP_OPT_NONE); return aa_audit(AUDIT_APPARMOR_AUTO, tracer, sa, audit_ptrace_cb); } |