Commit 954317fe authored by Thomas Meyer's avatar Thomas Meyer Committed by John Johansen

apparmor: Fix bool initialization/comparison

Bool initializations should use true and false. Bool tests don't need
comparisons.
Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 7bba39ae
...@@ -846,7 +846,7 @@ module_param_call(audit, param_set_audit, param_get_audit, ...@@ -846,7 +846,7 @@ module_param_call(audit, param_set_audit, param_get_audit,
/* Determines if audit header is included in audited messages. This /* Determines if audit header is included in audited messages. This
* provides more context if the audit daemon is not running * provides more context if the audit daemon is not running
*/ */
bool aa_g_audit_header = 1; bool aa_g_audit_header = true;
module_param_named(audit_header, aa_g_audit_header, aabool, module_param_named(audit_header, aa_g_audit_header, aabool,
S_IRUSR | S_IWUSR); S_IRUSR | S_IWUSR);
...@@ -871,7 +871,7 @@ module_param_named(path_max, aa_g_path_max, aauint, S_IRUSR); ...@@ -871,7 +871,7 @@ module_param_named(path_max, aa_g_path_max, aauint, S_IRUSR);
* DEPRECATED: read only as strict checking of load is always done now * DEPRECATED: read only as strict checking of load is always done now
* that none root users (user namespaces) can load policy. * that none root users (user namespaces) can load policy.
*/ */
bool aa_g_paranoid_load = 1; bool aa_g_paranoid_load = true;
module_param_named(paranoid_load, aa_g_paranoid_load, aabool, S_IRUGO); module_param_named(paranoid_load, aa_g_paranoid_load, aabool, S_IRUGO);
/* Boot time disable flag */ /* Boot time disable flag */
...@@ -1119,7 +1119,7 @@ static int __init apparmor_init(void) ...@@ -1119,7 +1119,7 @@ static int __init apparmor_init(void)
if (!apparmor_enabled || !security_module_enable("apparmor")) { if (!apparmor_enabled || !security_module_enable("apparmor")) {
aa_info_message("AppArmor disabled by boot time parameter"); aa_info_message("AppArmor disabled by boot time parameter");
apparmor_enabled = 0; apparmor_enabled = false;
return 0; return 0;
} }
...@@ -1175,7 +1175,7 @@ static int __init apparmor_init(void) ...@@ -1175,7 +1175,7 @@ static int __init apparmor_init(void)
aa_destroy_aafs(); aa_destroy_aafs();
aa_teardown_dfa_engine(); aa_teardown_dfa_engine();
apparmor_enabled = 0; apparmor_enabled = false;
return error; return error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment