summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2019-04-10 12:43:44 (GMT)
committerAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2019-04-10 12:43:44 (GMT)
commit39f543269782c64b86143a5dc1343a869cadf3bf (patch)
treefc32439569d42d0c35161224faf8342ac1c71e10
parent0494ac65682189f6a8c64de0d54e65ab24eac7ae (diff)
parent9061fcc46bb1ac5ffc16d036b632dd80963b7b52 (diff)
downloadframeworks_base-39f543269782c64b86143a5dc1343a869cadf3bf.zip
frameworks_base-39f543269782c64b86143a5dc1343a869cadf3bf.tar.gz
frameworks_base-39f543269782c64b86143a5dc1343a869cadf3bf.tar.bz2
[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc46b
Change-Id: Ia35b381b55199cc0c3b516ccc5091993a2c3d488
-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 35bb819..ede8b9c 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3014,6 +3014,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 &&