• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

Revisão7da57cb8b321c1d5a9c45fd3c0435b67e9ab5d15 (tree)
Hora2019-06-06 04:09:05
AutorPavel Grafov <pgrafov@goog...>
Commitersyphyr

Mensagem de Log

Limit IsSeparateProfileChallengeAllowed to system callers

Fixes: 128599668
Test: build, set up separate challenge
Change-Id: I2fef9ab13614627c0f1bcca04759d0974fc6181a
(cherry picked from commit 1b6301cf2430f192c9842a05fc22984d782bade9)

Mudança Sumário

Diff

--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3156,6 +3156,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
31563156
31573157 @Override
31583158 public boolean isSeparateProfileChallengeAllowed(int userHandle) {
3159+ if (!isCallerWithSystemUid()) {
3160+ throw new SecurityException("Caller must be system");
3161+ }
31593162 ComponentName profileOwner = getProfileOwner(userHandle);
31603163 // Profile challenge is supported on N or newer release.
31613164 return profileOwner != null &&