diff options
author | Kees Cook <keescook@chromium.org> | 2018-09-15 00:37:20 +0200 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2019-01-08 22:18:43 +0100 |
commit | d6aed64b74b73b64278c059eacd59d87167aa968 (patch) | |
tree | 0fd4b2e95d633d09a9f3d7e3711aeab68d328e88 /security/yama | |
parent | LoadPin: Initialize as ordered LSM (diff) | |
download | linux-d6aed64b74b73b64278c059eacd59d87167aa968.tar.xz linux-d6aed64b74b73b64278c059eacd59d87167aa968.zip |
Yama: Initialize as ordered LSM
This converts Yama from being a direct "minor" LSM into an ordered LSM.
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/yama')
-rw-r--r-- | security/yama/yama_lsm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c index ffda91a4a1aa..eb1da1303d2e 100644 --- a/security/yama/yama_lsm.c +++ b/security/yama/yama_lsm.c @@ -477,9 +477,15 @@ static void __init yama_init_sysctl(void) static inline void yama_init_sysctl(void) { } #endif /* CONFIG_SYSCTL */ -void __init yama_add_hooks(void) +static int __init yama_init(void) { pr_info("Yama: becoming mindful.\n"); security_add_hooks(yama_hooks, ARRAY_SIZE(yama_hooks), "yama"); yama_init_sysctl(); + return 0; } + +DEFINE_LSM(yama) = { + .name = "yama", + .init = yama_init, +}; |