mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Make app_system.c use ast_safe_system
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
#include <asterisk/channel.h>
|
#include <asterisk/channel.h>
|
||||||
#include <asterisk/pbx.h>
|
#include <asterisk/pbx.h>
|
||||||
#include <asterisk/module.h>
|
#include <asterisk/module.h>
|
||||||
|
#include <asterisk/app.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -53,7 +54,7 @@ static int system_exec(struct ast_channel *chan, void *data)
|
|||||||
}
|
}
|
||||||
LOCAL_USER_ADD(u);
|
LOCAL_USER_ADD(u);
|
||||||
/* Do our thing here */
|
/* Do our thing here */
|
||||||
res = system((char *)data);
|
res = ast_safe_system((char *)data);
|
||||||
if ((res < 0) && (errno != ECHILD)) {
|
if ((res < 0) && (errno != ECHILD)) {
|
||||||
ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data);
|
ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data);
|
||||||
res = -1;
|
res = -1;
|
||||||
|
Reference in New Issue
Block a user