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

Commit 16ec386b authored by Alan Stokes's avatar Alan Stokes Committed by Automerger Merge Worker
Browse files

Merge "Don't allow shell to spoof initiating package name." into rvc-dev am:...

Merge "Don't allow shell to spoof initiating package name." into rvc-dev am: 717f3d84 am: 818db795 am: 5fef26d5 am: 32743111

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

Change-Id: Ie17dded1e4c65b2bbff98f81329262f35b755ad8
parents a578b1a6 32743111
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -525,7 +525,9 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements

        if ((callingUid == Process.SHELL_UID) || (callingUid == Process.ROOT_UID)) {
            params.installFlags |= PackageManager.INSTALL_FROM_ADB;

            // adb installs can override the installingPackageName, but not the
            // initiatingPackageName
            installerPackageName = null;
        } else {
            if (callingUid != Process.SYSTEM_UID) {
                // The supplied installerPackageName must always belong to the calling app.