{"action":"created","issue":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/325","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/325/comments","events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/325/events","html_url":"https://github.com/rabbitmq/rabbitmq-server/issues/325","id":108173871,"number":325,"title":" rabbitmqctl unable to pass arguments containing '*'","user":{"login":"CVTJNII","id":13871930,"avatar_url":"https://avatars.githubusercontent.com/u/13871930?v=3","gravatar_id":"","url":"https://api.github.com/users/CVTJNII","html_url":"https://github.com/CVTJNII","followers_url":"https://api.github.com/users/CVTJNII/followers","following_url":"https://api.github.com/users/CVTJNII/following{/other_user}","gists_url":"https://api.github.com/users/CVTJNII/gists{/gist_id}","starred_url":"https://api.github.com/users/CVTJNII/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CVTJNII/subscriptions","organizations_url":"https://api.github.com/users/CVTJNII/orgs","repos_url":"https://api.github.com/users/CVTJNII/repos","events_url":"https://api.github.com/users/CVTJNII/events{/privacy}","received_events_url":"https://api.github.com/users/CVTJNII/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-24T17:14:10Z","updated_at":"2015-09-24T17:58:06Z","closed_at":"2015-09-24T17:58:06Z","body":"Rabbitmqctl is unable to pass arguments containing '*' as the shell expands them.  For example, running the user setup commands from the [Sensu install guide](https://sensuapp.org/docs/0.20/install-rabbitmq) fails:\r\n\r\n```\r\nroot@c20dc47d849f:/# rabbitmqctl set_permissions -p /sensu sensu \".*\" \".*\" \".*\"\r\nSetting permissions for user \"sensu\" in vhost \"/sensu\" ...\r\nroot@c20dc47d849f:/# tail -n 2 /var/log/rabbitmq/rabbit@c20dc47d849f.log\r\n=INFO REPORT==== 24-Sep-2015::17:09:21 ===\r\nSetting permissions for 'sensu' in '/sensu' to '....dockerenv.dockerinit', '....dockerenv.dockerinit', '....dockerenv.dockerinit'\r\n```\r\n\r\nThe wrapper is expanding .* as a path.  This appears to be bug introduced by 7fe2c61ac3764865b784dcf34131358dba0d722d when 'printf %s $arg' was added.  Note that $arg is unescaped.\r\n\r\nThe following resolves this for my particular use case, however I have not tested the other use cases for which the print was added:\r\n\r\n```\r\ndiff --git a/packaging/common/rabbitmq-script-wrapper b/packaging/common/rabbitmq-script-wrapper\r\nindex 67fa669..ed4c276 100644\r\n--- a/packaging/common/rabbitmq-script-wrapper\r\n+++ b/packaging/common/rabbitmq-script-wrapper\r\n@@ -22,7 +22,7 @@ fi\r\n \r\n for arg in \"$@\" ; do\r\n     # Wrap each arg in single quotes and wrap single quotes in double quotes, so that they're passed through cleanly.\r\n-    arg=`printf %s $arg | sed $SED_OPT -e \"s/'/'\\\"'\\\"'/g\"`\r\n+    arg=`printf %s \"$arg\" | sed $SED_OPT -e \"s/'/'\\\"'\\\"'/g\"`\r\n     CMDLINE=\"${CMDLINE} '${arg}'\"\r\n done\r\n```"},"comment":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/comments/143004868","html_url":"https://github.com/rabbitmq/rabbitmq-server/issues/325#issuecomment-143004868","issue_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/325","id":143004868,"user":{"login":"dumbbell","id":159804,"avatar_url":"https://avatars.githubusercontent.com/u/159804?v=3","gravatar_id":"","url":"https://api.github.com/users/dumbbell","html_url":"https://github.com/dumbbell","followers_url":"https://api.github.com/users/dumbbell/followers","following_url":"https://api.github.com/users/dumbbell/following{/other_user}","gists_url":"https://api.github.com/users/dumbbell/gists{/gist_id}","starred_url":"https://api.github.com/users/dumbbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumbbell/subscriptions","organizations_url":"https://api.github.com/users/dumbbell/orgs","repos_url":"https://api.github.com/users/dumbbell/repos","events_url":"https://api.github.com/users/dumbbell/events{/privacy}","received_events_url":"https://api.github.com/users/dumbbell/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T17:58:06Z","updated_at":"2015-09-24T17:58:06Z","body":"Thank you!"}}