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:
@@ -50,7 +50,7 @@ for perm in root.findall('permission'):
|
|||||||
levels = set(perm.get('{}protectionLevel'.format(ANDROID_XML_NS)).split('|'))
|
levels = set(perm.get('{}protectionLevel'.format(ANDROID_XML_NS)).split('|'))
|
||||||
# Check if the protections include signature and privileged
|
# Check if the protections include signature and privileged
|
||||||
levels_masked = levels & privileged_permission_mask
|
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)
|
privileged_permissions.add(name)
|
||||||
|
|
||||||
# Definitions for privapp-permissions
|
# Definitions for privapp-permissions
|
||||||
|
Reference in New Issue
Block a user