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

Commit e896c6d6 authored by Roshan Pius's avatar Roshan Pius
Browse files

ConnectivityService: Grant networkstack uid extra privileges

The wifi network factories/agents are going to run in the network stack
process for devices which accept wifi mainline module. Allow these
factories/agents to perform privileged operations.

Bug: 142115344
Test: ACTS test
Change-Id: I2dd412ac5c6b67f52c87113fcda345e1f531f9c4
WifiNetworkRequestTest:test_connect_failure_user_rejected passes now.
(cherry-picked from c7580b1d59ee126cd6867cb6fe4485a69e2b4622)
parent 87700db4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3264,7 +3264,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
        final NetworkRequestInfo nri = mNetworkRequests.get(request);

        if (nri != null) {
            if (Process.SYSTEM_UID != callingUid && nri.mUid != callingUid) {
            if (Process.SYSTEM_UID != callingUid && Process.NETWORK_STACK_UID != callingUid
                    && nri.mUid != callingUid) {
                log(String.format("UID %d attempted to %s for unowned request %s",
                        callingUid, requestedOperation, nri));
                return null;