summaryrefslogtreecommitdiffstats
path: root/include/binder
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-06-18 13:07:53 -0700
committerBrad Fitzpatrick <bradfitz@android.com>2010-06-21 12:56:35 -0700
commit702ea9d42f52fc145090c0f0bfbe64993e4b8b33 (patch)
tree98267a504e452fb6c9d7fc98ea68d19d2d5aecd0 /include/binder
parent5adc399c76f432ce3301db5fa1da511351b70373 (diff)
downloadframeworks_native-702ea9d42f52fc145090c0f0bfbe64993e4b8b33.zip
frameworks_native-702ea9d42f52fc145090c0f0bfbe64993e4b8b33.tar.gz
frameworks_native-702ea9d42f52fc145090c0f0bfbe64993e4b8b33.tar.bz2
Start of work on passing around StrictMode policy over Binder calls.
This is (intendend to be) a no-op change. At this stage, Binder RPCs just have an additional uint32 passed around in the header, right before the interface name. But nothing is actually done with them yet. That value should right now always be 0. This now boots and seems to work. Change-Id: I135b7c84f07575e6b9717fef2424d301a450df7b
Diffstat (limited to 'include/binder')
-rw-r--r--include/binder/IPCThreadState.h6
-rw-r--r--include/binder/Parcel.h5
2 files changed, 9 insertions, 2 deletions
diff --git a/include/binder/IPCThreadState.h b/include/binder/IPCThreadState.h
index 3ab985d..04e24d2 100644
--- a/include/binder/IPCThreadState.h
+++ b/include/binder/IPCThreadState.h
@@ -40,6 +40,9 @@ public:
int getCallingPid();
int getCallingUid();
+
+ void setStrictModePolicy(int32_t policy);
+ int32_t getStrictModePolicy() const;
int64_t clearCallingIdentity();
void restoreCallingIdentity(int64_t token);
@@ -109,8 +112,9 @@ private:
status_t mLastError;
pid_t mCallingPid;
uid_t mCallingUid;
+ int32_t mStrictModePolicy;
};
-
+
}; // namespace android
// ---------------------------------------------------------------------------
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h
index 66c34b2..2cc4db9 100644
--- a/include/binder/Parcel.h
+++ b/include/binder/Parcel.h
@@ -56,9 +56,12 @@ public:
bool hasFileDescriptors() const;
+ // Writes the RPC header.
status_t writeInterfaceToken(const String16& interface);
+ // Parses the RPC header, returning true if the interface name
+ // in the header matches the expected interface from the caller.
bool enforceInterface(const String16& interface) const;
- bool checkInterface(IBinder*) const;
+ bool checkInterface(IBinder*) const;
void freeData();