summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2019-04-10 12:44:06 (GMT)
committerAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2019-04-10 12:44:06 (GMT)
commit20007cb46fa44f882800d9157dd1a0ab307862de (patch)
treefe73c89120edad3f99f33f3353f5052ef9a6a79f
parent2833e406e07b04af0533c3b585db36afaa17e11c (diff)
parentd5ce9a41b6ffe13cb87435f0b89415d779589fa4 (diff)
downloadframeworks_base-20007cb46fa44f882800d9157dd1a0ab307862de.zip
frameworks_base-20007cb46fa44f882800d9157dd1a0ab307862de.tar.gz
frameworks_base-20007cb46fa44f882800d9157dd1a0ab307862de.tar.bz2
[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc46b am: 39f5432697 am: 9c0bc5405e am: 55209aca88 am: d5ce9a41b6
Change-Id: I9f9adc6f9979b3ee946e43150556f0ba971a67f8
-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 55a1a45..3c1cc83 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3436,6 +3436,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 &&