Adding YAMA hooks also when YAMA is not stacked.
authorSalvatore Mesoraca <s.mesoraca16@gmail.com>
Mon, 3 Aug 2015 10:40:51 +0000 (12:40 +0200)
committerJames Morris <james.l.morris@oracle.com>
Mon, 3 Aug 2015 15:36:18 +0000 (01:36 +1000)
Without this patch YAMA will not work at all if it is chosen
as the primary LSM instead of being "stacked".

Signed-off-by: Salvatore Mesoraca <s.mesoraca16@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/yama/yama_lsm.c

index 9ed3250..5ebb896 100644 (file)
@@ -406,6 +406,7 @@ static __init int yama_init(void)
         */
        if (!security_module_enable("yama"))
                return 0;
+       yama_add_hooks();
 #endif
        pr_info("Yama: becoming mindful.\n");