diff options
author | Damien Miller <djm@mindrot.org> | 2000-04-20 07:42:21 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-04-20 07:42:21 +1000 |
commit | 166fca8894807de71b741a779330bd23edfec013 (patch) | |
tree | 387371567ce5b3c89c52e18f3a22348f1456af8d /session.c | |
parent | 3ef692aa05a4b0d94a114be0826d32d0c8f67f1b (diff) |
- Sync with OpenBSD CVS:
[clientloop.c login.c serverloop.c ssh-agent.c ssh.h sshconnect.c sshd.c]
- pid_t
[session.c]
- remove bogus chan_read_failed. this could cause data
corruption (missing data) at end of a SSH2 session.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "includes.h" | 10 | #include "includes.h" |
11 | RCSID("$OpenBSD: session.c,v 1.4 2000/04/14 10:30:33 markus Exp $"); | 11 | RCSID("$OpenBSD: session.c,v 1.5 2000/04/19 09:24:39 markus Exp $"); |
12 | 12 | ||
13 | #include "xmalloc.h" | 13 | #include "xmalloc.h" |
14 | #include "ssh.h" | 14 | #include "ssh.h" |
@@ -1388,8 +1388,12 @@ session_exit_message(Session *s, int status) | |||
1388 | /* disconnect channel */ | 1388 | /* disconnect channel */ |
1389 | debug("session_exit_message: release channel %d", s->chanid); | 1389 | debug("session_exit_message: release channel %d", s->chanid); |
1390 | channel_cancel_cleanup(s->chanid); | 1390 | channel_cancel_cleanup(s->chanid); |
1391 | if (c->istate == CHAN_INPUT_OPEN) | 1391 | /* |
1392 | chan_read_failed(c); | 1392 | * emulate a write failure with 'chan_write_failed', nobody will be |
1393 | * interested in data we write. | ||
1394 | * Note that we must not call 'chan_read_failed', since there could | ||
1395 | * be some more data waiting in the pipe. | ||
1396 | */ | ||
1393 | chan_write_failed(c); | 1397 | chan_write_failed(c); |
1394 | s->chanid = -1; | 1398 | s->chanid = -1; |
1395 | } | 1399 | } |