diff options
author | Svetoslav <svetoslavganov@google.com> | 2015-09-10 15:30:45 -0700 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2015-09-10 17:02:39 -0700 |
commit | ea02ec65c19ac209047ed164272ec2b07f47e496 (patch) | |
tree | b80c7a93880cd2155e4f57ac3b21d6202e232585 | |
parent | 40bb46d77f3decad35273d509f32fd05bd2ed2ac (diff) | |
download | base-ea02ec65c19ac209047ed164272ec2b07f47e496.tar.gz |
Add op package to the UID special case handling in account manager.
The account manager has a hardcoded rule to change the calling
UID if the caller is the system and another UID is passed in.
We have to do the same acrobatics for the app op package as if
the UID changes the opPackageName will not match the new UID.
If we used the passed in UID we should also use the passed in
op package name.
bug:23968092
Change-Id: I0c0c2a720e9edbf82001952929d990702f8650ca
-rw-r--r-- | services/core/java/com/android/server/accounts/AccountManagerService.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index d590d7aaf3dd..d5e9a320da84 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java @@ -2607,6 +2607,7 @@ public class AccountManagerService // be passed in the original caller's uid here, which is what should be used for filtering. if (packageUid != -1 && UserHandle.isSameApp(callingUid, Process.myUid())) { callingUid = packageUid; + opPackageName = callingPackage; } List<String> visibleAccountTypes = getTypesVisibleToCaller(callingUid, userId, |