[rabbitmq-discuss] Can't use backtick in password
Kal Sze
swordangel at gmail.com
Tue Aug 20 14:06:21 BST 2013
Hello Simon,
Sorry. Maybe I was jumping to conclusions. It appears that the "fix"
is also broken in subtle ways. If I apply the fix and try this:
$ sudo rabbitmqctl set_permissions -p foo foo ".*" ".*" ".*"
It would fail. I tried sticking a line of `echo "$@"` in
/usr/lib/rabbitmq/bin/rabbitmqctl, right before the `exec` command.
Somehow the '-p' ends up getting dropped from $@. I don't really know
why.
So the only thing we are sure about is that the current rabbitmqctl
script in version 3.1.5 is broken for edge cases with special
characters in the password.
Best Regards,
Kal
On 20 August 2013 20:58, Simon MacMullen <simon at rabbitmq.com> wrote:
> On 20/08/13 08:12, Kal Sze wrote:
>>
>> After obtaining some help from the #bash channel on Freenode IRC, it
>> appears that the correct fix would be to use proper string substitution
>> in the rabbitmqctlscript:
>>
>> Replace this line:\
>> su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/${SCRIPT}
>> ${CMDLINE}"
>>
>> With this line:
>> su rabbitmq -s /bin/sh -c 'script=$1; shift; "$script" "$@"' _
>> "/usr/lib/rabbitmq/bin/${SCRIPT}" "$@"
>
>
> Ah, thank you. We will stare carefully at this change, all the while cursing
> whoever invented string substitution in shell scripts... :-)
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, Pivotal
More information about the rabbitmq-discuss
mailing list