]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
LSM: generalize flag passing to security_capable
authorMicah Morton <mortonm@chromium.org>
Tue, 8 Jan 2019 00:10:53 +0000 (16:10 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 26 Mar 2019 14:54:20 +0000 (09:54 -0500)
commit6b2e1baa0740bc74ceb90fd9e612661f2a1395e9
treec2c299294ca25ae601c13b03891b0678417f7be2
parent0e7a7396ae9accc84c16bd3e87efc1a5b8d9884a
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>
(cherry picked from commit c1a85a00ea66cb6f0bd0f14e47c28c2b0999799f)
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
13 files changed:
include/linux/lsm_hooks.h
include/linux/security.h
kernel/capability.c
kernel/seccomp.c
security/apparmor/capability.c
security/apparmor/include/capability.h
security/apparmor/ipc.c
security/apparmor/lsm.c
security/apparmor/resource.c
security/commoncap.c
security/security.c
security/selinux/hooks.c
security/smack/smack_access.c