LSM: Tie enabling logic to presence in ordered list
authorKees Cook <keescook@chromium.org>
Tue, 9 Oct 2018 21:42:57 +0000 (14:42 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 8 Jan 2019 21:18:42 +0000 (13:18 -0800)
commita8027fb0d188599ccdb2096f49f708bae04d86c4
treefdef774e00b724d4ecf2eb0b997dc2ce773c8663
parent79f7865d844c7703e3dc0e2f5b9ed2f3a4f412e5
LSM: Tie enabling logic to presence in ordered list

Until now, any LSM without an enable storage variable was considered
enabled. This inverts the logic and sets defaults to true only if the
LSM gets added to the ordered initialization list. (And an exception
continues for the major LSMs until they are integrated into the ordered
initialization in a later patch.)

Signed-off-by: Kees Cook <keescook@chromium.org>
include/linux/lsm_hooks.h
security/security.c