lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220609135831.68818-1-xiujianfeng@huawei.com>
Date:   Thu, 9 Jun 2022 21:58:31 +0800
From:   Xiu Jianfeng <xiujianfeng@...wei.com>
To:     <zohar@...ux.ibm.com>, <dmitry.kasatkin@...il.com>,
        <jmorris@...ei.org>, <serge@...lyn.com>
CC:     <linux-integrity@...r.kernel.org>,
        <linux-security-module@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] ima: Use if/else statement in init_ima()

Cleanup in init_ima(), replace if(cond)/if(!cond) statement with
if/else statement.

Signed-off-by: Xiu Jianfeng <xiujianfeng@...wei.com>
---
 security/integrity/ima/ima_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 040b03ddc1c7..e1edc83fca51 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -1068,8 +1068,7 @@ static int __init init_ima(void)
 	error = register_blocking_lsm_notifier(&ima_lsm_policy_notifier);
 	if (error)
 		pr_warn("Couldn't register LSM notifier, error %d\n", error);
-
-	if (!error)
+	else
 		ima_update_policy_flags();
 
 	return error;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ