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

Commit eff99182 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Escape arguments before passing to netd."

parents 93799ba0 0c232f5a
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -1471,9 +1471,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
    public void setDnsInterfaceForPid(String iface, int pid) throws IllegalStateException {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
        try {
            String cmd = "resolver setifaceforpid " + iface + " " + pid;

            mConnector.execute(cmd);
            mConnector.execute("resolver", "setifaceforpid", iface, pid);
        } catch (NativeDaemonConnectorException e) {
            throw new IllegalStateException(
                    "Error communicating with native deamon to set interface for pid" + iface, e);
@@ -1484,9 +1482,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
    public void clearDnsInterfaceForPid(int pid) throws IllegalStateException {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
        try {
            String cmd = "resolver clearifaceforpid " + pid;

            mConnector.execute(cmd);
            mConnector.execute("resolver", "clearifaceforpid", pid);
        } catch (NativeDaemonConnectorException e) {
            throw new IllegalStateException(
                    "Error communicating with native deamon to clear interface for pid " + pid, e);