Define shell explicitly for runuser command

Because the rabbitmq user shell defaults to /bin/false, we must
explicitly define a shell when using the runuser command

Issue: rabbitmq/rabbitmq-server-release#32
PR: rabbitmq/rabbitmq-server-release#40

[#150221349]

Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>
This commit is contained in:
Jean-Sébastien Pedron 2017-08-31 16:56:26 +01:00 committed by Gerhard Lazu
parent a36d1c14ae
commit aa84ddcf36
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ exec_script_as_rabbitmq() {
exec_script_as_root() {
if [ -x /sbin/runuser ]
then
exec /sbin/runuser -c "/usr/lib/rabbitmq/bin/$SCRIPT $CMDLINE" rabbitmq
exec /sbin/runuser -s /bin/sh -c "/usr/lib/rabbitmq/bin/$SCRIPT $CMDLINE" rabbitmq
elif [ -x /bin/su ]
then
exec /bin/su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/$SCRIPT $CMDLINE"