netd: fix argument interpretation bug
While working around the logwrap() issue, it was replaced with system()
which could lead to various commands getting misinterpreted.
We now use a system() equivalent that doesn't use "sh -c".
Bug:5758556
Change-Id: I2599b526ac34bcfca18d05261286d902d547efda
diff --git a/SecondaryTableController.cpp b/SecondaryTableController.cpp
index 1be1c79..287bba5 100644
--- a/SecondaryTableController.cpp
+++ b/SecondaryTableController.cpp
@@ -31,6 +31,8 @@
#include <cutils/log.h>
#include <cutils/properties.h>
+extern "C" int system_nosh(const char *command);
+
#include "ResponseCode.h"
#include "SecondaryTableController.h"
@@ -132,7 +134,7 @@
free(cmd);
return -1;
}
- ret = system(cmd);
+ ret = system_nosh(cmd);
free(cmd);
return ret;
}