Merge "Enforce system privilege for getGlobalProxyAdmin" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c826749c90
@@ -7464,7 +7464,8 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
|||||||
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
|
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
|
||||||
|
|
||||||
final CallerIdentity caller = getCallerIdentity();
|
final CallerIdentity caller = getCallerIdentity();
|
||||||
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
|
Preconditions.checkCallAuthorization(
|
||||||
|
hasFullCrossUsersPermission(caller, userHandle) && isSystemUid(caller));
|
||||||
|
|
||||||
synchronized (getLockObject()) {
|
synchronized (getLockObject()) {
|
||||||
DevicePolicyData policy = getUserData(UserHandle.USER_SYSTEM);
|
DevicePolicyData policy = getUserData(UserHandle.USER_SYSTEM);
|
||||||
|
|||||||
Reference in New Issue
Block a user