From 66b355e013bfad43aea475f388743353a1c7f852 Mon Sep 17 00:00:00 2001 From: Paul Keith Date: Tue, 12 Oct 2021 23:15:44 -0500 Subject: [PATCH] verify-permissions: Fix permissions mask check again * This cannot be greater than the length of the mask set, so don't bother allowing that case in the conditional --- cicd/verify-permissions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cicd/verify-permissions.py b/cicd/verify-permissions.py index 9e6ad16..1cd364c 100755 --- a/cicd/verify-permissions.py +++ b/cicd/verify-permissions.py @@ -50,7 +50,7 @@ for perm in root.findall('permission'): levels = set(perm.get('{}protectionLevel'.format(ANDROID_XML_NS)).split('|')) # Check if the protections include signature and privileged levels_masked = levels & privileged_permission_mask - if len(levels_masked) >= len(privileged_permission_mask): + if len(levels_masked) == len(privileged_permission_mask): privileged_permissions.add(name) # Definitions for privapp-permissions