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
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.
*** This bug has been marked as a duplicate of bug 666081 ***