Commit b0374e79 authored by Paul Moore's avatar Paul Moore
Browse files

loadpin: move initcalls to the LSM framework

parent cdc02881
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -270,11 +270,6 @@ static int __init loadpin_init(void)
	return 0;
}

DEFINE_LSM(loadpin) = {
	.id = &loadpin_lsmid,
	.init = loadpin_init,
};

#ifdef CONFIG_SECURITY_LOADPIN_VERITY

enum loadpin_securityfs_interface_index {
@@ -434,9 +429,15 @@ static int __init init_loadpin_securityfs(void)
	return 0;
}

fs_initcall(init_loadpin_securityfs);
#endif /* CONFIG_SECURITY_LOADPIN_VERITY */

DEFINE_LSM(loadpin) = {
	.id = &loadpin_lsmid,
	.init = loadpin_init,
#ifdef CONFIG_SECURITY_LOADPIN_VERITY
	.initcall_fs = init_loadpin_securityfs,
#endif /* CONFIG_SECURITY_LOADPIN_VERITY */
};

/* Should not be mutable after boot, so not listed in sysfs (perm == 0). */
module_param(enforce, int, 0);