implementing eow at openssh.com

Matt Johnston matt at ucc.asn.au
Sat Sep 21 00:39:14 WST 2013


On Wed, Jul 24, 2013 at 09:21:43PM -0400, Catalin Patulea wrote:
> eow at openssh.com is an extension that allows EPIPE to propagate through
> SSH sessions. For example:
...
> I have a draft implementation of this in dropbear (attached), but
> there is one significant issue:
> 
> In cli-session.c, stdin, stdout and stderr are dup()'ed in order to be
> able to restore file flags at the end of the session. This means that
...
> What is the history behind this? The comment says:
> /* We store std{in,out,err}'s flags, so we can set them back on exit
>  * (otherwise busybox's ash isn't happy */

On some particular busybox version I found that I had to set
stdin/stdout (perhaps just one of them?) back to
non-blocking before dbclient exited. Otherwise the shell
somehow inherited the non-blocking FDs and either spun or
exited. It was fairly odd and a while ago, I can't remember
the exact details. Possibly that code could be removed now.

I've fixed Dropbear's erroneous sending
send_msg_channel_failure when wantreply was set - it was
just a problem for dbclient, the server was OK I think.

Cheers,
Matt


More information about the Dropbear mailing list