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

@ -4882,4 +4882,6 @@ static __init int smack_init(void)
* Smack requires early initialization in order to label
* all processes and objects when they are created.
*/
security_initcall(smack_init);
DEFINE_LSM(smack) = {
.init = smack_init,
};