summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2019-04-03 11:00:11 -0700
committer android-build-merger <android-build-merger@google.com> 2019-04-03 11:00:11 -0700
commit94c0cd9393c22759d3a375cf222d24e90bdcd8a9 (patch)
tree253d3e2b9a72ffaf68e225cad52421ca2e2a49a4 /libs/binder/Parcel.cpp
parentb7350658a584317b8ff4830b0e86c814674a4e4f (diff)
parent06c65b864b3f7c2869f8d5b92cc53b1626c0b39a (diff)
Merge changes from topic "kernel_v503_2"
am: 06c65b864b Change-Id: I920dbe69867a81fe8a41aaeb2fe450892abd74ee
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index ca6a97debb..9f8c40876e 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -215,7 +215,7 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/,
}
if (binder != nullptr) {
- IBinder *local = binder->localBinder();
+ BBinder *local = binder->localBinder();
if (!local) {
BpBinder *proxy = binder->remoteBinder();
if (proxy == nullptr) {
@@ -227,6 +227,9 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/,
obj.handle = handle;
obj.cookie = 0;
} else {
+ if (local->isRequestingSid()) {
+ obj.flags |= FLAT_BINDER_FLAG_TXN_SECURITY_CTX;
+ }
obj.hdr.type = BINDER_TYPE_BINDER;
obj.binder = reinterpret_cast<uintptr_t>(local->getWeakRefs());
obj.cookie = reinterpret_cast<uintptr_t>(local);