From 2c5f833d98bb1cf6cb59606bd9decdd7ef802b60 Mon Sep 17 00:00:00 2001 From: Daniil Fedotov Date: Mon, 24 Jul 2017 17:50:11 +0100 Subject: [PATCH] Require root or rabbitmq user for rabbitmq-plugins. For some reason, the rabbitmq-plugins command could be run from arbitrary user, which would result in errors unable to access a cookie file or plugins configuration files. Changed to work the same way as rabbitmqctl - require root or rabbitmq user. [Fixes #149425921] --- scripts/rabbitmq-script-wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rabbitmq-script-wrapper b/scripts/rabbitmq-script-wrapper index 9623f01709..0a2b981dc4 100644 --- a/scripts/rabbitmq-script-wrapper +++ b/scripts/rabbitmq-script-wrapper @@ -31,7 +31,7 @@ if [ `id -u` = `id -u rabbitmq` -a "$SCRIPT" = "rabbitmq-server" ] ; then . "$RABBITMQ_ENV" exec /usr/lib/rabbitmq/bin/rabbitmq-server "$@" @STDOUT_STDERR_REDIRECTION@ -elif [ `id -u` = `id -u rabbitmq` -o "$SCRIPT" = "rabbitmq-plugins" ] ; then +elif [ `id -u` = `id -u rabbitmq` ] ; then if [ -f $PWD/.erlang.cookie ] ; then export HOME=. fi