diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-29 23:53:12 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-29 23:53:12 +0000 |
commit | 2d8b362efece5062f608bced817e72b878a4d0a6 (patch) | |
tree | cd96c7073dc0845bf83f8ca63f15b9f5f1879586 /apps | |
parent | 1fa8fbb23ce6e313190f4142ffd00e19e826e31d (diff) |
Merged revisions 172441 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r172441 | tilghman | 2009-01-29 17:15:40 -0600 (Thu, 29 Jan 2009) | 16 lines
Merged revisions 172438 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r172438 | tilghman | 2009-01-29 16:54:29 -0600 (Thu, 29 Jan 2009) | 9 lines
Lose the CAP_NET_ADMIN at every fork, instead of at startup. Otherwise, if
Asterisk runs as a non-root user and the administrator does a 'restart now',
Asterisk loses the ability to set QOS on packets.
(closes issue #14004)
Reported by: nemo
Patches:
20090105__bug14004.diff.txt uploaded by Corydon76 (license 14)
Tested by: Corydon76
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@172504 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_rpt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_rpt.c b/apps/app_rpt.c index 1c2dbd4e1..7e0fef1de 100644 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -359,6 +359,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/cdr.h" #include "asterisk/options.h" #include "asterisk/manager.h" +#include "asterisk/app.h" + #include <termios.h> #ifdef NEW_ASTERISK @@ -1966,7 +1968,7 @@ unsigned int seq; sprintf(str,"%s?node=%s&time=%u&seqno=%u",myrpt->p.statpost_url, myrpt->name,(unsigned int) now,seq); if (pairs) sprintf(str + strlen(str),"&%s",pairs); - if (!(pid = fork())) + if (!(pid = ast_safe_fork(0))) { execv(astrs[0],astrs); ast_log(LOG_ERROR, "exec of %s failed.\n", astrs[0]); |