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

Use /bin/sh as the explicit shell when using su in ejabberdctl.

Some distributions (such as Fedora) use /sbin/nologin as the login
shell for the ejabberd user. The newer version of ejabberdctl uses
su to perform the command if the INSTALLUSER invokes the script.
This commit adjusts the call to su so that it passes /bin/sh as
the shell to use so that it will work correctly when the ejabberd
user's shell is set to nologin.

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
This commit is contained in:
Randy Barlow 2017-12-10 12:52:22 -05:00
parent ae66c17ec0
commit 12d9d97baa

View File

@ -110,7 +110,7 @@ export ERL_LIBS
exec_cmd()
{
case $EXEC_CMD in
as_install_user) su -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
as_current_user) "$@" ;;
esac
}