summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2012-02-03 12:06:38 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-02-03 12:06:38 -0800
commitbf6644a7e6b63153da73be191798a56f460a7057 (patch)
treecfea6b67d2ff5aa4849cfdb1810d33b45cd061bf /libs
parenta4d82be7c4ba7e81f829f718e9e1331bddeafd9e (diff)
parent1ef7d13172248848805b9ceb6161b0741d8580dd (diff)
downloadframeworks_base-bf6644a7e6b63153da73be191798a56f460a7057.zip
frameworks_base-bf6644a7e6b63153da73be191798a56f460a7057.tar.gz
frameworks_base-bf6644a7e6b63153da73be191798a56f460a7057.tar.bz2
am 1ef7d131: Merge "Multi-user - 1st major checkin"
* commit '1ef7d13172248848805b9ceb6161b0741d8580dd': Multi-user - 1st major checkin
Diffstat (limited to 'libs')
-rw-r--r--libs/binder/IPCThreadState.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 629b899..b578a6c 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -371,6 +371,11 @@ int IPCThreadState::getCallingUid()
return mCallingUid;
}
+int IPCThreadState::getOrigCallingUid()
+{
+ return mOrigCallingUid;
+}
+
int64_t IPCThreadState::clearCallingIdentity()
{
int64_t token = ((int64_t)mCallingUid<<32) | mCallingPid;
@@ -641,6 +646,7 @@ IPCThreadState::IPCThreadState()
{
pthread_setspecific(gTLS, this);
clearCaller();
+ mOrigCallingUid = mCallingUid;
mIn.setDataCapacity(256);
mOut.setDataCapacity(256);
}
@@ -987,6 +993,7 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
mCallingPid = tr.sender_pid;
mCallingUid = tr.sender_euid;
+ mOrigCallingUid = tr.sender_euid;
int curPrio = getpriority(PRIO_PROCESS, mMyThreadId);
if (gDisableBackgroundScheduling) {
@@ -1045,6 +1052,7 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
mCallingPid = origPid;
mCallingUid = origUid;
+ mOrigCallingUid = origUid;
IF_LOG_TRANSACTIONS() {
TextOutput::Bundle _b(alog);