Prepending 'exec' to proxy command automatically
Konstantin Tokarev
annulen at yandex.ru
Fri Dec 18 22:04:17 AWST 2015
18.12.2015, 16:24, "Matt Johnston" <matt at ucc.asn.au>:
> On Wed, Dec 16, 2015 at 04:32:03PM +0300, Konstantin Tokarev wrote:
>> 08.12.2015, 21:00, "Konstantin Tokarev" <annulen at yandex.ru>:
>> > If dbclient is given proxy command which does not start with exec, shell process is lingering alongside proxy command process. However, I've found that OpenSSH client (ProxyCommand option) prepends exec automatically.
>> >
>> > I think it would be convenient if dbclient added exec by default, but this will break if someone is already using explicit exec in -J argument. Note that OpenSSH client also breaks with exec.
>> >
>> > So options are:
>> >
>> > 1. Just prepend exec to all proxy commands and make too clever people fix their scripts.
>> > 2. Check if proxy command starts with exec, if not, prepend it.
>> > 3. Add separate -o ProxyCommand option prepending exec (it also should substitute %h, %p, and %r to be compatible with OpenSSH). Leave -J as is for compatibility but mark it as deprecated.
>> >
>> > What is the best way?
>
> Sorry, missed this mail originally. I think 1 is best, I've
> pushed that as
> https://secure.ucc.asn.au/hg/dropbear/rev/f7d565054e5f
Why not use asprintf? I see scpmisc.c already uses vasprintf.
> Interestingly bash and zsh seem to avoid the lingering shell
> themselves without "exec". dash works for testing.
I'm using busybox shell (and I guess it's the most popular shell choice among dropbear users ;)
--
Regards,
Konstantin
More information about the Dropbear
mailing list