summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Clark <tim@lshift.net>2009-06-14 18:28:38 +0100
committerTim Clark <tim@lshift.net>2009-06-14 18:28:38 +0100
commit87590309f26e2cb0ed0076947720aab967110720 (patch)
tree0f57a9c5fedc65ea83ce58fd58b09d29d0969c42
parent094efd1826088a4634c3c1e41a281f3959f2af66 (diff)
downloadrabbitmq-server-87590309f26e2cb0ed0076947720aab967110720.tar.gz
Fixing up escaping of commandline argumentsbug20961
-rw-r--r--packaging/macports/net/rabbitmq-server/files/rabbitmq-script-wrapper12
1 files changed, 1 insertions, 11 deletions
diff --git a/packaging/macports/net/rabbitmq-server/files/rabbitmq-script-wrapper b/packaging/macports/net/rabbitmq-server/files/rabbitmq-script-wrapper
index b806049c..0d7118c4 100644
--- a/packaging/macports/net/rabbitmq-server/files/rabbitmq-script-wrapper
+++ b/packaging/macports/net/rabbitmq-server/files/rabbitmq-script-wrapper
@@ -1,20 +1,10 @@
#!/bin/bash
-# Escape spaces and quotes, because shell is revolting.
-for arg in "$@" ; do
- # Escape quotes in parameters, so that they're passed through cleanly.
- arg=$(sed -e 's/"/\\"/' <<-END
- $arg
- END
- )
- CMDLINE="${CMDLINE} \"${arg}\""
-done
-
cd /var/lib/rabbitmq
SCRIPT=`basename $0`
if [ `id -u` = 0 ] ; then
- sudo -u rabbitmq -H /usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}
+ sudo -u rabbitmq -H /usr/lib/rabbitmq/bin/${SCRIPT} "$@"
else
/usr/lib/rabbitmq/bin/${SCRIPT}
echo -e "\nOnly root should run ${SCRIPT}\n"