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)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user