4.6p1 chan_read_failed error

Bill Ralph
2007-04-05T17:51:13Z

I just applied the nchan.c patch to openssh-4.6p1 as furnished in the
previous message from Damien Miller:

> Well, it also undoes the fix for bug #52. I think it is safe to simply hush
> the error message:

> Index: nchan.c
> ==================================================================> CS
file: /var/cvs/openssh/nchan.c,v
> retrieving revision 1.56
> diff -u -p -r1.56 nchan.c
> --- nchan.c	5 Aug 2006 02:39:40 -0000	1.56
> +++ nchan.c	4 Apr 2007 03:56:11 -0000
> @@ -135,15 +135,16 @@ chan_rcvd_oclose1(Channel *c)
>  void
>  chan_read_failed(Channel *c)
>   {
> -	debug2("channel %d: read failed", c->self);
> +	debug2("channel %d: read failed, istate %d", c->self,
c->istate);
>  	switch (c->istate) {
>  	case CHAN_INPUT_OPEN:
>  		chan_shutdown_read(c);
>  		chan_set_istate(c, CHAN_INPUT_WAIT_DRAIN);
>  		break;
>  	default:
> -		error("channel %d: chan_read_failed for istate %d",
> -		    c->self, c->istate);
> +		if (!c->isatty || !c->detach_close)
> +			error("channel %d: chan_read_failed for istate %d",
< +			    c->self, c->istate);
>  		break;
>  	}
>  }

Unfortunately, sshd still produces the message: error: channel 0:
chan_read_failed for istate 3

--

---------------------------------------
 ___ _ _ _   ___      _      _
| _ |_) | | | _ \__ _| |_ __| |_
| _ \ | | | |   / _` | | '_ \ ' \
|___/_|_|_| |_|_\__,_|_| .__/_||_|
I work for the US Navy.|_| We are not
responsible for each other's mistakes.
---------------------------------------