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

Commit b84b315b authored by Ayush Sharma's avatar Ayush Sharma
Browse files

Enforce system privilege for getGlobalProxyAdmin

getGlobalProxyAdmin is a hidden API and called just from Settings.
So enforcing system uid check.

Bug: 206127671
Test: NA
Change-Id: Id4bce828bc69867c9c4d20b991e9e53e8ae385f2
Merged-In: Id4bce828bc69867c9c4d20b991e9e53e8ae385f2
(cherry picked from commit 554e19a3)
parent ab0466f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7452,7 +7452,8 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
        final CallerIdentity caller = getCallerIdentity();
        Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
        Preconditions.checkCallAuthorization(
                hasFullCrossUsersPermission(caller, userHandle) && isSystemUid(caller));
        synchronized (getLockObject()) {
            DevicePolicyData policy = getUserData(UserHandle.USER_SYSTEM);