25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Check for Effective GID EGID in ejabberdctl (thanks to Rustam Aliyev)(EJAB-1160)

SVN Revision: 2894
This commit is contained in:
Badlop 2010-01-12 18:13:30 +00:00
parent 1bcd481fdc
commit 82cd0adb79

View File

@ -57,11 +57,14 @@ fi
# check the proper system user is used
ID=`id -g`
GIDS=`id -G`
EJID=`id -g $INSTALLUSER`
EXEC_CMD="false"
if [ $ID -eq 0 ] ; then
for GID in $GIDS; do
if [ $GID -eq 0 ] ; then
EXEC_CMD="su ${INSTALLUSER} -p -c"
fi
fi
done
if [ "$ID" -eq "$EJID" ] ; then
EXEC_CMD="sh -c"
fi