LSM: Lift LSM selection out of individual LSMs
authorKees Cook <keescook@chromium.org>
Fri, 14 Sep 2018 06:17:50 +0000 (23:17 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 8 Jan 2019 21:18:42 +0000 (13:18 -0800)
commitf4941d75b9cba5e1fae1aebe0139dcca0703a294
treefca97d9b39b5291c138795b7e6262faba2dbec5b
parentc5459b829b716dafd226ad270f25c9a3050f7586
LSM: Lift LSM selection out of individual LSMs

As a prerequisite to adjusting LSM selection logic in the future, this
moves the selection logic up out of the individual major LSMs, making
their init functions only run when actually enabled. This considers all
LSMs enabled by default unless they specified an external "enable"
variable.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: John Johansen <john.johansen@canonical.com>
include/linux/lsm_hooks.h
security/apparmor/lsm.c
security/security.c
security/selinux/hooks.c
security/smack/smack_lsm.c
security/tomoyo/tomoyo.c