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>
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
Reference in New Issue
Block a user