hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/security/tomoyo/load_policy.c
....@@ -24,7 +24,7 @@
2424 static int __init tomoyo_loader_setup(char *str)
2525 {
2626 tomoyo_loader = str;
27
- return 0;
27
+ return 1;
2828 }
2929
3030 __setup("TOMOYO_loader=", tomoyo_loader_setup);
....@@ -37,11 +37,12 @@
3737 static bool tomoyo_policy_loader_exists(void)
3838 {
3939 struct path path;
40
+
4041 if (!tomoyo_loader)
4142 tomoyo_loader = CONFIG_SECURITY_TOMOYO_POLICY_LOADER;
4243 if (kern_path(tomoyo_loader, LOOKUP_FOLLOW, &path)) {
43
- printk(KERN_INFO "Not activating Mandatory Access Control "
44
- "as %s does not exist.\n", tomoyo_loader);
44
+ pr_info("Not activating Mandatory Access Control as %s does not exist.\n",
45
+ tomoyo_loader);
4546 return false;
4647 }
4748 path_put(&path);
....@@ -63,7 +64,7 @@
6364 static int __init tomoyo_trigger_setup(char *str)
6465 {
6566 tomoyo_trigger = str;
66
- return 0;
67
+ return 1;
6768 }
6869
6970 __setup("TOMOYO_trigger=", tomoyo_trigger_setup);
....@@ -96,8 +97,7 @@
9697 if (!tomoyo_policy_loader_exists())
9798 return;
9899 done = true;
99
- printk(KERN_INFO "Calling %s to load policy. Please wait.\n",
100
- tomoyo_loader);
100
+ pr_info("Calling %s to load policy. Please wait.\n", tomoyo_loader);
101101 argv[0] = (char *) tomoyo_loader;
102102 argv[1] = NULL;
103103 envp[0] = "HOME=/";