LSM: Convert security_initcall() into DEFINE_LSM()

Instead of using argument-based initializers, switch to defining the
contents of struct lsm_info on a per-LSM basis. This also drops
the final use of the now inaccurate "initcall" naming.

Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Casey Schaufler <[email protected]>
Reviewed-by: James Morris <[email protected]>
Signed-off-by: James Morris <[email protected]>
This commit is contained in:
Kees Cook 2018-10-10 17:18:23 -07:00 • committed by James Morris
commit 3d6e5f6dcf
6 changed files with 17 additions and 8 deletions

View file

@ -550,4 +550,6 @@ static int __init tomoyo_init(void)
return 0;
}
security_initcall(tomoyo_init);
DEFINE_LSM(tomoyo) = {
.init = tomoyo_init,
};