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
This commit is contained in:
Paul Keith 2021-10-12 23:15:44 -05:00
parent a8b1bba0c8
commit 66b355e013

View File

@ -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