https://bugzilla.mindrot.org/show_bug.cgi?id=1980 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1614, 1669, 1822, 1823, | |2068 --- Comment #18 from Damien Miller <djm at mindrot.org> --- Roll in some other ssh-copy-id bugs. I think the update fixes some of these already. -- 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.
https://bugzilla.mindrot.org/show_bug.cgi?id=1980 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |http://git.hands.com/ssh-co | |py-id -- 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.
https://bugzilla.mindrot.org/show_bug.cgi?id=1980 Bug 1980 depends on bug 1614, which changed state. Bug 1614 Summary: ssh-copy-id doesn't seem to set correct selinux permissions https://bugzilla.mindrot.org/show_bug.cgi?id=1614 What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED -- 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.
https://bugzilla.mindrot.org/show_bug.cgi?id=1980 Bug 1980 depends on bug 1823, which changed state. Bug 1823 Summary: specify port in ssh-copy-id https://bugzilla.mindrot.org/show_bug.cgi?id=1823 What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED -- 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.
https://bugzilla.mindrot.org/show_bug.cgi?id=1980 Bug 1980 depends on bug 1822, which changed state. Bug 1822 Summary: ssh-copy-id uses ${1%:} instead of "$@" https://bugzilla.mindrot.org/show_bug.cgi?id=1822 What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED -- 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.
https://bugzilla.mindrot.org/show_bug.cgi?id=1980 --- Comment #19 from Damien Miller <djm at mindrot.org> ---> > > 67 GETOPT_PARSED=$(getopt --options 'i::p:nh?' --name "$0" --quiet -- "$@") > > > > Would it be possible to pass -o [arg] though to ssh? Quite a few > > people have requested this over the years. > > I presume that will need to be properly quoted in order to be passed > through, and that they may want to specify more than one -o option.I don't think so, you just need to retain -o's argument and pass the whole mass through quoted. E.g. -o) PORTOPTION="\"-o$2"\ " shift 2 ;; should do it.> > I think populate_new_ids() might need a umask call too. > > Do you mean 0022 in case they have something silly set, or 0177 or > some > such for reasons of paranoia?paranoia ;) -- 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.
https://bugzilla.mindrot.org/show_bug.cgi?id=1980 --- Comment #20 from Philip Hands <phil at hands.com> --- (In reply to comment #19)> > > > 67 GETOPT_PARSED=$(getopt --options 'i::p:nh?' --name "$0" --quiet -- "$@") > > > > > > Would it be possible to pass -o [arg] though to ssh? Quite a few > > > people have requested this over the years. > > > > I presume that will need to be properly quoted in order to be passed > > through, and that they may want to specify more than one -o option. > > I don't think so, you just need to retain -o's argument and pass the > whole mass through quoted. E.g. > > -o) > PORTOPTION="\"-o$2"\ " > shift 2 > ;; > > should do it.I'm presuming that was meant to be: PORTOPTION="\"-o$2\" " or in fact, probably SSH_O_OPTS=... Anyway, I cannot get that quoting to work -- it seems to leave the quotes in and then use it as a hostname -- I've tried a few variations with no luck so far. Also, I'd say (assuming the quoting worked) that it should actually be something like the following, in order to allow -o to be specified more than once: SSH_OPTS="$SSH_OPTS \"-o$2\"" with the -p option similarly doing: SSH_OPTS="$SSH_OPTS -p $2" and replacing PORTOPTION with SSH_OPTS throughout. I'm also mildly concerned about how appropriate the -o options that people specify are going to be for the diagnostic probes, and other ssh calls. I'm assuming that they'll be harmless, and perhaps essential, so should be added to every ssh call in the script. 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> > > I think populate_new_ids() might need a umask call too. > > > > Do you mean 0022 in case they have something silly set, or 0177 or > > some > > such for reasons of paranoia? > > paranoia ;)Fair enough, I've added that. Cheers, Phil.t -- 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.
https://bugzilla.mindrot.org/show_bug.cgi?id=1980 --- 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 a 'b c' d # ... 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")" a b c d # ... 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. Martin -- 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.
https://bugzilla.mindrot.org/show_bug.cgi?id=1980 --- Comment #22 from Philip Hands <phil at hands.com> --- OK, I was hoping to be able to avoid the eval set ... trick, but it seems we need it, so I've done that, and while I was about it also decided to get rid of all the echos in favour of printfs to avoid any chance of getting bitten by echo's crappy portability. latest version on my git repo. Cheers, Phil. -- 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.