summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/channels.h
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2002-03-25 21:13:52 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2002-03-25 21:13:52 +0000
commit407a1452617c42e854e450a90972186bb4983cbe (patch)
tree46a4b2d539e2d23f8c68fcd25a3a149e55a16495 /usr.bin/ssh/channels.h
parent8436143b1190862baa4fcb67d29042b946d1a14b (diff)
don't send stderr data after EOF, accept this from older known (broken)
sshd servers only, fixes http://bugzilla.mindrot.org/show_bug.cgi?id=179
Diffstat (limited to 'usr.bin/ssh/channels.h')
-rw-r--r--usr.bin/ssh/channels.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.bin/ssh/channels.h b/usr.bin/ssh/channels.h
index 707d9a92582..0da2d4e5e02 100644
--- a/usr.bin/ssh/channels.h
+++ b/usr.bin/ssh/channels.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.h,v 1.65 2002/03/04 17:27:39 stevesk Exp $ */
+/* $OpenBSD: channels.h,v 1.66 2002/03/25 21:13:51 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -135,6 +135,18 @@ struct Channel {
#define CHAN_CLOSE_SENT 0x01
#define CHAN_CLOSE_RCVD 0x02
+#define CHAN_EOF_SENT 0x04
+#define CHAN_EOF_RCVD 0x08
+
+/* check whether 'efd' is still in use */
+#define CHANNEL_EFD_INPUT_ACTIVE(c) \
+ (compat20 && c->extended_usage == CHAN_EXTENDED_READ && \
+ (c->efd != -1 || \
+ buffer_len(&c->extended) > 0))
+#define CHANNEL_EFD_OUTPUT_ACTIVE(c) \
+ (compat20 && c->extended_usage == CHAN_EXTENDED_WRITE && \
+ ((c->efd != -1 && !(c->flags & CHAN_EOF_RCVD)) || \
+ buffer_len(&c->extended) > 0))
/* channel management */