summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2019-04-10 12:44:01 (GMT)
committerAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2019-04-10 12:44:01 (GMT)
commitd5ce9a41b6ffe13cb87435f0b89415d779589fa4 (patch)
tree443439dbfe0f85b0f40def963c086af1542795bf
parent022bfaa808801b0fe2e9bc9c2f48c01ade9e2345 (diff)
parent55209aca8829c6587b706e9162f5f663fe2700d2 (diff)
downloadframeworks_base-d5ce9a41b6ffe13cb87435f0b89415d779589fa4.zip
frameworks_base-d5ce9a41b6ffe13cb87435f0b89415d779589fa4.tar.gz
frameworks_base-d5ce9a41b6ffe13cb87435f0b89415d779589fa4.tar.bz2
[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc46b am: 39f5432697 am: 9c0bc5405e am: 55209aca88
Change-Id: I9f56349020376c4cb459597bf01cb4956344f7a8
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 6de92d7..28a78c8 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3155,6 +3155,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
@Override
public boolean isSeparateProfileChallengeAllowed(int userHandle) {
+ if (!isCallerWithSystemUid()) {
+ throw new SecurityException("Caller must be system");
+ }
ComponentName profileOwner = getProfileOwner(userHandle);
// Profile challenge is supported on N or newer release.
return profileOwner != null &&