Re: [patch] fix broken --stdin-stdout that writes to stdin
"Israel G. Lugo" <[email protected]> Thu, 21 Jun 2007 00:57:15 +0100
| Newsgroups | gmane.comp.gnu.httptunnel.bugs |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Just wanted to note that I accidentally sent my bug report from an obsolete email address ([email protected]). Please direct any discussion to this address ([email protected]) instead; also, kindly use this email address ([email protected]) on the ChangeLog entry if you do accept the patch. Thank you. Regards, Israel G. Lugo Israel G. Lugo wrote: > Greetings, > > There is a bug in the current development version of httptunnel > (3.3), where common.c:handle_tunnel_input( ) is calling write_all > on stdin. This breaks anything calling htc or hts with > --stdin-stdout, unless stdin happens to be something which can be > written to (e.g. a socket or a pseudo-terminal). In particular, it > breaks OpenSSH using htc as ProxyCommand (causes an infinite > connect/disconnect loop where htc connects, gets the banner from > the server, then dies when trying to pass it to the ssh client). > > The code already includes a check for fd == 0, intending to write > to stdout instead in such cases - however, the check is broken, > since it is passing 0 instead of 1. I am attaching a patch to fix > the problem, made against > http://www.nocrew.org/software/httptunnel/httptunnel-3.3.tar.gz. > > ChangeLog entry: > > 2007-06-20 Israel G. Lugo <[email protected]> > > * common.c (handle_tunnel_input): really write to stdout if fd == > 0. > > > > Regards, Israel G. Lugo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGeb7agn9msFnMGkcRAl91AKChbFxbL39j8epbE8c4tBPqGxfP7ACeJWEC g95UV5UavAAxLxxsqm5ntY0= =dbgG -----END PGP SIGNATURE-----