summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Grafov <pgrafov@google.com>2019-04-10 23:41:27 (GMT)
committerandroid-build-merger <android-build-merger@google.com>2019-04-10 23:41:27 (GMT)
commit3ae9c5c63b1246475604a62a10814636811fbd3a (patch)
treed24dbc9bb7b58ec14db321a86e28883f10a58882
parented9361ce1cad3fd8d2ddff526abd784c23d96ced (diff)
parent20007cb46fa44f882800d9157dd1a0ab307862de (diff)
downloadframeworks_base-3ae9c5c63b1246475604a62a10814636811fbd3a.zip
frameworks_base-3ae9c5c63b1246475604a62a10814636811fbd3a.tar.gz
frameworks_base-3ae9c5c63b1246475604a62a10814636811fbd3a.tar.bz2
[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc46b am: 39f5432697 am: 9c0bc5405e am: 55209aca88 am: d5ce9a41b6
am: 20007cb46f Change-Id: I3bf88bf3a830dc7dea61e32d1df31b273a5d1afe
-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 ed5cce8..53b5eef 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3434,6 +3434,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 &&