]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit428bc0be70596e0c9318c3e355401db9fdf4dacd
tree457c5725691883fbe36ca344c94d956d30ffc587
parent12330d4d26ca3c37b7d5c28e82e5c9921b808316
LSM: generalize flag passing to security_capable

BugLink: https://bugs.launchpad.net/bugs/1862259
[ Upstream commit c1a85a00ea66cb6f0bd0f14e47c28c2b0999799f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@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