[Bug 1980] use updated ssh-copy-id

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Feb 15 21:11:42 EST 2013


--- Comment #21 from Martin Kletzander <mkletzan at redhat.com> ---
(In reply to comment #20)
> (In reply to comment #19)
> anyway, here's the failed attempt at that patch -- suggestions as to
> how to make the quoting work properly would be welcome:
> http://git.hands.com/ssh-copy-id?p=ssh-copy-id.git;a=commitdiff;
> h=79ea2824f05cf3c1491231e9acf5faa3cc415221

The quoting doesn't seem to work as expected no matter what I'm trying
to do.  The only working approach seems to be using 'set' for SSH_OPTS
and then "$@" for the proper use of the parameters, but that makes lots
of places in the code pretty unhappy.  Other working approach (that
might be the only solution) seems to be eval'ing the expanded string. 
I 've gotten this tip after I've started shouting and closed the
editor, so I ended up with no attemp on this at all.  I'll have a look
at it later, but in case somebody wants to have a look, this info might
help a bit:

 # Eliminating the problem to the smallest part possible ...
 $ l="a 'b c' d"
 $ for i in $l; do echo $i; done
 # ... shows the problem I've been dealing with
 # Using eval on this command in this case ...
 $ eval "$(echo "for i in $l; do echo  \$i; done")"
 b c
 # ... makes it work properly

I've also realized that assigning it to a variable makes it sad again. 
Hope this helps someone.

It could be also fixed using arrays, but those won't be very
compatible, I guess.


You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.

More information about the openssh-bugs mailing list