Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb517df3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Revert "Adding in verification of calling UID in onShellCommand"" into...

Merge "Revert "Adding in verification of calling UID in onShellCommand"" into rvc-dev am: 75aaa4c2 am: e327817f am: c4cd5efa am: d03e3687

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/26191039



Change-Id: Idb0cd2e7c0b887f8283c8b82465fbd7d0587484d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ec5fe78c d03e3687
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -8728,13 +8728,6 @@ public class ActivityManagerService extends IActivityManager.Stub
    public void onShellCommand(FileDescriptor in, FileDescriptor out,
            FileDescriptor err, String[] args, ShellCallback callback,
            ResultReceiver resultReceiver) {
        final int callingUid = Binder.getCallingUid();
        if (callingUid != ROOT_UID && callingUid != Process.SHELL_UID) {
            if (resultReceiver != null) {
                resultReceiver.send(-1, null);
            }
            throw new SecurityException("Shell commands are only callable by root or shell");
        }
        (new ActivityManagerShellCommand(this, false)).exec(
                this, in, out, err, args, callback, resultReceiver);
    }