Bug 718336 - initscript causes asterisk to run as root
Summary: initscript causes asterisk to run as root
Keywords:
Status: CLOSED DUPLICATE of bug 666081
Alias: None
Product: Fedora
Classification: Fedora
Component: asterisk
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeffrey C. Ollie
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-01 20:46 UTC by Anthony Messina
Modified: 2011-09-20 13:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-20 13:54:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Anthony Messina 2011-07-01 20:46:45 UTC
The initscript patch replaces replaces ASTARGS with AST_ARGS (underscore) in the AST_USER and AST_GROUP lines, but does not include AST_ARGS in the lines stat start the daemon, leaving asterisk to run as root.  The 0001-Modify-init-scripts-for-better-Fedora-compatibilty.patch, if modified to change AST_ARGS to ASTARGS works well with asterisk running as the user and group asterisk.

 103         if [ $AST_USER ] ; then
 104 -               ASTARGS="-U $AST_USER"
 105 +               AST_ARGS="$AST_ARGS -U $AST_USER"
 106         fi
 107         if [ $AST_GROUP ] ; then
 108 -               ASTARGS="$ASTARGS -G $AST_GROUP"
 109 +               AST_ARGS="$AST_ARGS -G $AST_GROUP"
 110         fi
 111         if [ $AST_CONFIG ]; then
 112 -               ASTARGS="$ASTARGS -C $AST_CONFIG/asterisk.conf"
 113 +               ASTARGS="$ASTARGS -C $AST_CONFIG"
 114         elif [ $ALTCONF ]; then
 115                 ASTARGS="$ASTARGS -C $ALTCONF"
 116         fi
 117 @@ -115,9 +127,9 @@ start() {
 118         fi
 119         if [ "x$COLOR" = "xyes" ]; then
 120                 export TERM=linux
 121 -               daemon sh -c "$DAEMON $ASTARGS -c" >/dev/null </dev/null 2>&1 &
 122 +               daemon sh -c "$DAEMON $ASTARGS $AST_EXTRA_ARGS -c" >/dev/null </dev/null 2>&1 &
 123         else
 124 -               daemon $DAEMON $ASTARGS
 125 +               daemon $DAEMON $ASTARGS $AST_EXTRA_ARGS

Comment 1 Tom Hughes 2011-08-22 08:09:08 UTC
This really needs to be fixed - this bug means that many people are probably unwittingly running asterisk as root with all the greater risks which that entails.

Comment 2 Jeffrey C. Ollie 2011-09-20 13:54:44 UTC

*** This bug has been marked as a duplicate of bug 666081 ***


Note You need to log in before you can comment on or make changes to this bug.