You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rabbitmqctl is unable to pass arguments containing '*' as the shell expands them. For example, running the user setup commands from the Sensu install guide fails:
root@c20dc47d849f:/# rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*"
Setting permissions for user "sensu" in vhost "/sensu" ...
root@c20dc47d849f:/# tail -n 2 /var/log/rabbitmq/[email protected]
=INFO REPORT==== 24-Sep-2015::17:09:21 ===
Setting permissions for 'sensu' in '/sensu' to '....dockerenv.dockerinit', '....dockerenv.dockerinit', '....dockerenv.dockerinit'
The wrapper is expanding .* as a path. This appears to be bug introduced by 7fe2c61 when 'printf %s $arg' was added. Note that $arg is unescaped.
The following resolves this for my particular use case, however I have not tested the other use cases for which the print was added:
diff --git a/packaging/common/rabbitmq-script-wrapper b/packaging/common/rabbitmq-script-wrapper
index 67fa669..ed4c276 100644
--- a/packaging/common/rabbitmq-script-wrapper
+++ b/packaging/common/rabbitmq-script-wrapper
@@ -22,7 +22,7 @@ fi
for arg in "$@" ; do
# Wrap each arg in single quotes and wrap single quotes in double quotes, so that they're passed through cleanly.
- arg=`printf %s $arg | sed $SED_OPT -e "s/'/'\"'\"'/g"`
+ arg=`printf %s "$arg" | sed $SED_OPT -e "s/'/'\"'\"'/g"`
CMDLINE="${CMDLINE} '${arg}'"
done
The text was updated successfully, but these errors were encountered:
Rabbitmqctl is unable to pass arguments containing '*' as the shell expands them. For example, running the user setup commands from the Sensu install guide fails:
The wrapper is expanding .* as a path. This appears to be bug introduced by 7fe2c61 when 'printf %s $arg' was added. Note that $arg is unescaped.
The following resolves this for my particular use case, however I have not tested the other use cases for which the print was added:
The text was updated successfully, but these errors were encountered: