From: Thomas Meyer <thomas@m3y3r.de> To: john.johansen@canonical.com, james.l.morris@oracle.com, serge@hallyn.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] apparmor: Fix bool initialization/comparison Date: Sat, 07 Oct 2017 16:02:21 +0200 [thread overview] Message-ID: <1507383097088-925464657-17-diffsplit-thomas@m3y3r.de> (raw) In-Reply-To: <1507383097081-778026979-0-diffsplit-thomas@m3y3r.de> Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> --- diff -u -p a/security/apparmor/lsm.c b/security/apparmor/lsm.c --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -761,7 +761,7 @@ module_param_call(audit, param_set_audit /* Determines if audit header is included in audited messages. This * 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, S_IRUSR | S_IWUSR); @@ -786,7 +786,7 @@ module_param_named(path_max, aa_g_path_m * DEPRECATED: read only as strict checking of load is always done now * 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); /* Boot time disable flag */ @@ -1034,7 +1034,7 @@ static int __init apparmor_init(void) if (!apparmor_enabled || !security_module_enable("apparmor")) { aa_info_message("AppArmor disabled by boot time parameter"); - apparmor_enabled = 0; + apparmor_enabled = false; return 0; } @@ -1090,7 +1090,7 @@ alloc_out: aa_destroy_aafs(); aa_teardown_dfa_engine(); - apparmor_enabled = 0; + apparmor_enabled = false; return error; }
WARNING: multiple messages have this Message-ID (diff)
From: thomas@m3y3r.de (Thomas Meyer) To: linux-security-module@vger.kernel.org Subject: [PATCH] apparmor: Fix bool initialization/comparison Date: Sat, 07 Oct 2017 16:02:21 +0200 [thread overview] Message-ID: <1507383097088-925464657-17-diffsplit-thomas@m3y3r.de> (raw) In-Reply-To: <1507383097081-778026979-0-diffsplit-thomas@m3y3r.de> Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> --- diff -u -p a/security/apparmor/lsm.c b/security/apparmor/lsm.c --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -761,7 +761,7 @@ module_param_call(audit, param_set_audit /* Determines if audit header is included in audited messages. This * 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, S_IRUSR | S_IWUSR); @@ -786,7 +786,7 @@ module_param_named(path_max, aa_g_path_m * DEPRECATED: read only as strict checking of load is always done now * 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); /* Boot time disable flag */ @@ -1034,7 +1034,7 @@ static int __init apparmor_init(void) if (!apparmor_enabled || !security_module_enable("apparmor")) { aa_info_message("AppArmor disabled by boot time parameter"); - apparmor_enabled = 0; + apparmor_enabled = false; return 0; } @@ -1090,7 +1090,7 @@ alloc_out: aa_destroy_aafs(); aa_teardown_dfa_engine(); - apparmor_enabled = 0; + apparmor_enabled = false; return error; } -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-10-07 14:49 UTC|newest] Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-10-07 14:02 Cocci spatch "boolinit" - v4.14-rc1 Thomas Meyer 2017-10-07 14:02 ` [PATCH] f2fs: Fix bool initialization/comparison Thomas Meyer 2017-10-07 14:02 ` Thomas Meyer 2017-10-07 14:33 ` [f2fs-dev] " Ju Hyung Park 2017-10-07 19:30 ` Joe Perches 2017-10-09 1:48 ` Chao Yu 2017-10-09 1:48 ` Chao Yu 2017-10-10 17:41 ` Jaegeuk Kim 2017-10-07 14:02 ` [PATCH] cifs: " Thomas Meyer [not found] ` <1507383097083-1243109004-5-diffsplit-thomas-VsYtu1Qij5c@public.gmane.org> 2017-10-10 1:14 ` Nico Kadel-Garcia 2017-10-10 1:14 ` Nico Kadel-Garcia 2017-10-07 14:02 ` [PATCH] ima: " Thomas Meyer 2017-10-07 14:02 ` Thomas Meyer 2017-10-07 14:02 ` [PATCH] nfsd: " Thomas Meyer 2017-10-07 14:02 ` [PATCH] NFS: " Thomas Meyer 2017-10-07 14:02 ` [PATCH] pstore: " Thomas Meyer 2018-11-29 23:21 ` Kees Cook 2017-10-07 14:02 ` [PATCH] afs: " Thomas Meyer 2017-10-07 14:02 ` [PATCH] xfs: " Thomas Meyer 2017-10-09 14:24 ` Brian Foster 2017-10-07 14:02 ` [PATCH] ceph: " Thomas Meyer 2017-10-09 1:52 ` Yan, Zheng 2017-10-07 14:02 ` [PATCH] bfq: " Thomas Meyer 2017-10-07 14:02 ` [PATCH] proc: " Thomas Meyer 2017-10-07 14:02 ` [PATCH] exofs: " Thomas Meyer 2017-10-07 14:02 ` Thomas Meyer [this message] 2017-10-07 14:02 ` [PATCH] apparmor: " Thomas Meyer 2017-10-07 17:18 ` John Johansen 2017-10-07 17:18 ` John Johansen 2017-10-07 14:02 ` [PATCH] ext4: " Thomas Meyer 2017-10-07 14:02 ` [PATCH] btrfs: " Thomas Meyer 2017-10-09 16:05 ` David Sterba 2017-10-07 14:02 ` [PATCH] selinux: " Thomas Meyer 2017-10-07 14:02 ` Thomas Meyer 2017-10-10 23:17 ` Casey Schaufler 2017-10-10 23:17 ` Casey Schaufler 2017-10-10 23:19 ` Casey Schaufler 2017-10-10 23:19 ` Casey Schaufler 2017-10-13 22:40 ` Paul Moore 2017-10-13 22:40 ` Paul Moore 2017-10-07 14:02 ` [PATCH] configfs: " Thomas Meyer 2017-10-19 14:08 ` Christoph Hellwig 2017-10-10 15:19 ` [PATCH] afs: " David Howells
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1507383097088-925464657-17-diffsplit-thomas@m3y3r.de \ --to=thomas@m3y3r.de \ --cc=james.l.morris@oracle.com \ --cc=john.johansen@canonical.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-security-module@vger.kernel.org \ --cc=serge@hallyn.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.