Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 16c09788 authored by Sumedh Sen's avatar Sumedh Sen Committed by Android Build Coastguard Worker
Browse files

Check cross user permissions for a given UID

Instead of relying on Context#checkCallingOrSelfPermission, explicitly
check permissions against a given UID. However, to maintain legacy
behavior, replace custom UIDs with Binder.getCallingUid when enforcing
permissions from a method.

Also update tests affected by this change - by adding methods to mocked objects

Bug: 350456241

Test: sts-tradefed run sts-dynamic-develop -m CtsSecurityTestCases -t android.security.cts.ContentProviderMultiUserTests#testAccessFromInitialUser --user-type PRIMARY

Test: sts-tradefed run sts-dynamic-develop -m CtsSecurityTestCases -t android.security.cts.ContentProviderMultiUserTests --user-type SECONDARY
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ba90590efd98c3c1c4579031fc6083d0a96dd849)
Merged-In: Ib31cabff5714500471bd397c743e127c85751a5c
Change-Id: Ib31cabff5714500471bd397c743e127c85751a5c
parent f58054c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment