summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2019-04-10 12:43:56 (GMT)
committerAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2019-04-10 12:43:56 (GMT)
commit55209aca8829c6587b706e9162f5f663fe2700d2 (patch)
tree1aefb19a4335fcb55c2022376ef132dc5c9ca168
parent49a505f4f9bb026661b1cd61a360223b6a1aa56f (diff)
parent9c0bc5405e17f7c096e870836bd81203da4959b1 (diff)
downloadframeworks_base-55209aca8829c6587b706e9162f5f663fe2700d2.zip
frameworks_base-55209aca8829c6587b706e9162f5f663fe2700d2.tar.gz
frameworks_base-55209aca8829c6587b706e9162f5f663fe2700d2.tar.bz2
[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc46b am: 39f5432697 am: 9c0bc5405e
Change-Id: If32bb0948a2b9aa67b99ceae0ed9234f570198bf
-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 f679e7a..9ac1bb5 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3100,6 +3100,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 &&