diff options
author | 2008-05-09 16:21:13 +0000 | |
---|---|---|
committer | 2008-05-09 16:21:13 +0000 | |
commit | 7ab726baef512f10c484c85e7ea9c77a03dda821 (patch) | |
tree | c1dc4d15745282325f0c507e7dfc87d4dc2b351c /usr.bin/ssh/serverloop.c | |
parent | error-fd race: don't enable the error fd in the select bitmask (diff) | |
download | wireguard-openbsd-7ab726baef512f10c484c85e7ea9c77a03dda821.tar.xz wireguard-openbsd-7ab726baef512f10c484c85e7ea9c77a03dda821.zip |
unbreak
ssh -2 localhost od /bin/ls | true
ignoring SIGPIPE by adding a new channel message (EOW) that signals
the peer that we're not interested in any data it might send.
fixes bz #85; discussion, debugging and ok djm@
Diffstat (limited to 'usr.bin/ssh/serverloop.c')
-rw-r--r-- | usr.bin/ssh/serverloop.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c index 5a72730e989..225a8657ce4 100644 --- a/usr.bin/ssh/serverloop.c +++ b/usr.bin/ssh/serverloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: serverloop.c,v 1.150 2008/05/09 04:55:56 djm Exp $ */ +/* $OpenBSD: serverloop.c,v 1.151 2008/05/09 16:21:13 markus Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1122,7 +1122,10 @@ server_input_channel_req(int type, u_int32_t seq, void *ctxt) if ((c = channel_lookup(id)) == NULL) packet_disconnect("server_input_channel_req: " "unknown channel %d", id); - if (c->type == SSH_CHANNEL_LARVAL || c->type == SSH_CHANNEL_OPEN) + if (!strcmp(rtype, "eow@openssh.com")) { + packet_check_eom(); + chan_rcvd_eow(c); + } else if (c->type == SSH_CHANNEL_LARVAL || c->type == SSH_CHANNEL_OPEN) success = session_input_channel_req(c, rtype); if (reply) { packet_start(success ? |