Cumulative security CVE-2014-3686 patch
0cf0fcc Add os_exec() helper to run external programs
12b6e6a wpa_cli: Use os_exec() for action script execution
515fa39 hostapd_cli: Use more robust mechanism for action script execution
Bug: 17880188
Change-Id: I0c6162f5339b1f3d8d2cc59203b919455abd592b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/utils/os.h b/src/utils/os.h
index f196209..b9247d8 100644
--- a/src/utils/os.h
+++ b/src/utils/os.h
@@ -601,6 +601,15 @@
*/
int os_memcmp_const(const void *a, const void *b, size_t len);
+/**
+ * os_exec - Execute an external program
+ * @program: Path to the program
+ * @arg: Command line argument string
+ * @wait_completion: Whether to wait until the program execution completes
+ * Returns: 0 on success, -1 on error
+ */
+int os_exec(const char *program, const char *arg, int wait_completion);
+
#ifdef OS_REJECT_C_LIB_FUNCTIONS
#define malloc OS_DO_NOT_USE_malloc