mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Setup environment variables for the benefit of child processes and disallow changing them.
(closes issue #14899) Reported by: jmls Patches: 20090916__issue14899.diff.txt uploaded by tilghman (license 14) Tested by: jmls git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -44,6 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</parameter>
|
||||
</syntax>
|
||||
<description>
|
||||
Variables starting with <literal>AST_</literal> are reserved to the system and may not be set.
|
||||
</description>
|
||||
</function>
|
||||
<function name="STAT" language="en_US">
|
||||
@@ -106,7 +107,7 @@ static int env_read(struct ast_channel *chan, const char *cmd, char *data,
|
||||
static int env_write(struct ast_channel *chan, const char *cmd, char *data,
|
||||
const char *value)
|
||||
{
|
||||
if (!ast_strlen_zero(data)) {
|
||||
if (!ast_strlen_zero(data) && strncmp(data, "AST_", 4)) {
|
||||
if (!ast_strlen_zero(value)) {
|
||||
setenv(data, value, 1);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user