Make app_system.c use ast_safe_system
authorJames Golovich <james@gnuinter.net>
Mon, 22 Mar 2004 17:34:21 +0000 (17:34 +0000)
committerJames Golovich <james@gnuinter.net>
Mon, 22 Mar 2004 17:34:21 +0000 (17:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2523 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_system.c

index b13bced..010137f 100755 (executable)
@@ -17,6 +17,7 @@
 #include <asterisk/channel.h>
 #include <asterisk/pbx.h>
 #include <asterisk/module.h>
+#include <asterisk/app.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
@@ -53,7 +54,7 @@ static int system_exec(struct ast_channel *chan, void *data)
        }
        LOCAL_USER_ADD(u);
        /* Do our thing here */
-       res = system((char *)data);
+       res = ast_safe_system((char *)data);
        if ((res < 0) && (errno != ECHILD)) {
                ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data);
                res = -1;