upstream/openstack/rabbitmq-server/centos/meta_patches/Allow-rabbitmqctl-to-run-as-root-and-set-root-home.patch
zhipengl 75b332539d Refactor patches for rabbitmq-server package
Use rabbitmq-server-config package to package config files for
rabbitmq-server package. We can remove related patches of it.
Install custom ocf script and let SM call this one instead of
default one.

Deployment test and ping test between VMs pass
Config files check pass.

Story: 2003768
Task: 28042
Depends-on: https://review.openstack.org/#/c/621510

Change-Id: I64281b5601b7e457c724747f81e58cc1e42936dd
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2018-12-21 01:22:31 +00:00

27 lines
967 B
Diff

From cc25d3100a677e0c69a11975fd30ce72937ad575 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Tue, 24 Jan 2017 12:16:38 -0500
Subject: [PATCH 2/2] WRS: Allow-rabbitmqctl-to-run-as-root-and-set-root-home.patch
---
SOURCES/rabbitmq-script-wrapper | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/SOURCES/rabbitmq-script-wrapper b/SOURCES/rabbitmq-script-wrapper
index 3d2fc49..d039b23 100644
--- a/SOURCES/rabbitmq-script-wrapper
+++ b/SOURCES/rabbitmq-script-wrapper
@@ -42,7 +42,9 @@ elif [ `id -u` = `id -u rabbitmq` -o "$SCRIPT" = "rabbitmq-plugins" ] ; then
fi
exec /usr/lib/rabbitmq/bin/${SCRIPT} "$@"
elif [ `id -u` = 0 ] ; then
- su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}"
+ # WRS. Allow to run as root
+ export HOME=${HOME:-/root}
+ /bin/sh -c "/usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}"
else
/usr/lib/rabbitmq/bin/${SCRIPT}
echo
--
1.8.3.1