diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-09-28 23:19:47 -0400 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-10-03 16:58:41 -0700 |
commit | 8938ed2c8e906fc332301b64787728d4d34da571 (patch) | |
tree | b24c8e54739c81b47fb33196660e056a028253c3 /include | |
parent | c673c036712bb113ce2670c46ca808209b9d07e6 (diff) | |
download | frameworks_native-8938ed2c8e906fc332301b64787728d4d34da571.zip frameworks_native-8938ed2c8e906fc332301b64787728d4d34da571.tar.gz frameworks_native-8938ed2c8e906fc332301b64787728d4d34da571.tar.bz2 |
Add mechanism for Parcel to not allow FDs to be written to it.
This is to help implement issue #5224703.
Change-Id: I026a5890495537d15b57fe61227a640aac806d46
Diffstat (limited to 'include')
-rw-r--r-- | include/binder/Parcel.h | 5 | ||||
-rw-r--r-- | include/utils/Errors.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h index bfe13f0..57f5dd2 100644 --- a/include/binder/Parcel.h +++ b/include/binder/Parcel.h @@ -46,7 +46,7 @@ public: size_t dataAvail() const; size_t dataPosition() const; size_t dataCapacity() const; - + status_t setDataSize(size_t size); void setDataPosition(size_t pos) const; status_t setDataCapacity(size_t size); @@ -56,6 +56,8 @@ public: status_t appendFrom(const Parcel *parcel, size_t start, size_t len); + bool setAllowFds(bool allowFds); + bool hasFileDescriptors() const; // Writes the RPC header. @@ -212,6 +214,7 @@ private: mutable bool mFdsKnown; mutable bool mHasFds; + bool mAllowFds; release_func mOwner; void* mOwnerCookie; diff --git a/include/utils/Errors.h b/include/utils/Errors.h index 81f818b..0b75b19 100644 --- a/include/utils/Errors.h +++ b/include/utils/Errors.h @@ -72,6 +72,7 @@ enum { TIMED_OUT = 0x80000005, UNKNOWN_TRANSACTION = 0x80000006, #endif + FDS_NOT_ALLOWED = 0x80000007, }; // Restore define; enumeration is in "android" namespace, so the value defined |