summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2019-07-24 02:05:35 -0700
committer android-build-merger <android-build-merger@google.com> 2019-07-24 02:05:35 -0700
commit810f7fea897d1c24622dd3fea8a9304cffe2d46f (patch)
tree111502602de73fb3f8eb69c1c407d75fbce3181a /libs
parent901b8d9937f30b28a7c0d1b40daae5f489666c0b (diff)
parent79037d9dc2f43e9afbed5d5cced1341b26751be2 (diff)
Merge "Revert "libbinder: require shell/root UID for shell"" am: 5fa93fffe4
am: 79037d9dc2 Change-Id: I9b39ef66c4b7e28f5f249b0d0dea0d4457c88fda
Diffstat (limited to 'libs')
-rw-r--r--libs/binder/Binder.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index c1d916c62b..bdf0f8ef9f 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -17,15 +17,12 @@
#include <binder/Binder.h>
#include <atomic>
+#include <utils/misc.h>
#include <binder/BpBinder.h>
#include <binder/IInterface.h>
-#include <binder/IPCThreadState.h>
#include <binder/IResultReceiver.h>
#include <binder/IShellCallback.h>
#include <binder/Parcel.h>
-#include <cutils/android_filesystem_config.h>
-#include <cutils/compiler.h>
-#include <utils/misc.h>
#include <stdio.h>
@@ -128,19 +125,6 @@ status_t BBinder::transact(
{
data.setDataPosition(0);
- // Shell command transaction is conventionally implemented by
- // overriding onTransact by copy/pasting the parceling code from
- // this file. So, we must check permissions for it before we call
- // onTransact. This check is here because shell APIs aren't
- // guaranteed to be stable, and so they should only be used by
- // developers.
- if (CC_UNLIKELY(code == SHELL_COMMAND_TRANSACTION)) {
- uid_t uid = IPCThreadState::self()->getCallingUid();
- if (uid != AID_SHELL && uid != AID_ROOT) {
- return PERMISSION_DENIED;
- }
- }
-
status_t err = NO_ERROR;
switch (code) {
case PING_TRANSACTION: