[PATCH v1] security: remove duplicate logical judgments in return

Minjie Du duminjie at vivo.com
Tue Jul 4 08:56:52 UTC 2023


Fix: delate duplicate logical judgments:
aa_unpack_u32(e, &perm->allow, NULL);
Please check this. Thank you!

Signed-off-by: Minjie Du <duminjie at vivo.com>
---
 security/apparmor/policy_unpack.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index 694fb7a09..2069adf0a 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -646,7 +646,6 @@ static bool unpack_perm(struct aa_ext *e, u32 version, struct aa_perms *perm)
 		return false;
 
 	return	aa_unpack_u32(e, &perm->allow, NULL) &&
-		aa_unpack_u32(e, &perm->allow, NULL) &&
 		aa_unpack_u32(e, &perm->deny, NULL) &&
 		aa_unpack_u32(e, &perm->subtree, NULL) &&
 		aa_unpack_u32(e, &perm->cond, NULL) &&
-- 
2.39.0



More information about the Linux-security-module-archive mailing list