diff options
author | 2000-04-19 09:24:39 +0000 | |
---|---|---|
committer | 2000-04-19 09:24:39 +0000 | |
commit | 642ae7cf630b00922f2a4732d3a8a589c7b8696a (patch) | |
tree | e2ccffda0e49ab5349cb39127110323e9412be08 | |
parent | new products; rearrange. (diff) | |
download | wireguard-openbsd-642ae7cf630b00922f2a4732d3a8a589c7b8696a.tar.xz wireguard-openbsd-642ae7cf630b00922f2a4732d3a8a589c7b8696a.zip |
remove bogus chan_read_failed. this could cause data
corruption (missing data) at end of a SSH2 session.
-rw-r--r-- | usr.bin/ssh/session.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index e21988509c5..3b549c7ef4d 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -8,7 +8,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.4 2000/04/14 10:30:33 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.5 2000/04/19 09:24:39 markus Exp $"); #include "xmalloc.h" #include "ssh.h" @@ -1321,8 +1321,12 @@ session_exit_message(Session *s, int status) /* disconnect channel */ debug("session_exit_message: release channel %d", s->chanid); channel_cancel_cleanup(s->chanid); - if (c->istate == CHAN_INPUT_OPEN) - chan_read_failed(c); + /* + * emulate a write failure with 'chan_write_failed', nobody will be + * interested in data we write. + * Note that we must not call 'chan_read_failed', since there could + * be some more data waiting in the pipe. + */ chan_write_failed(c); s->chanid = -1; } |