Enforce QUERY_ADMIN_POLICY for getGlobalProxyAdmin
Bug: 206127671 Test: NA Change-Id: Id4bce828bc69867c9c4d20b991e9e53e8ae385f2
This commit is contained in:
@@ -7459,7 +7459,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) && canQueryAdminPolicy(caller));
|
||||||
|
|
||||||
synchronized (getLockObject()) {
|
synchronized (getLockObject()) {
|
||||||
DevicePolicyData policy = getUserData(UserHandle.USER_SYSTEM);
|
DevicePolicyData policy = getUserData(UserHandle.USER_SYSTEM);
|
||||||
|
|||||||
Reference in New Issue
Block a user