summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/channels.h
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2009-11-11 21:37:03 +0000
committermarkus <markus@openbsd.org>2009-11-11 21:37:03 +0000
commit46f6c48663674aba77c4ede5843b702bc6123df3 (patch)
tree87a224e179458595e4cfb333782ca5a9a83635c8 /usr.bin/ssh/channels.h
parentsync (diff)
downloadwireguard-openbsd-46f6c48663674aba77c4ede5843b702bc6123df3.tar.xz
wireguard-openbsd-46f6c48663674aba77c4ede5843b702bc6123df3.zip
fix race condition in x11/agent channel allocation: don't read after
the end of the select read/write fdset and make sure a reused FD is not touched before the pre-handlers are called. with and ok djm@
Diffstat (limited to 'usr.bin/ssh/channels.h')
-rw-r--r--usr.bin/ssh/channels.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/ssh/channels.h b/usr.bin/ssh/channels.h
index 79fbd227e98..0d0726d7bec 100644
--- a/usr.bin/ssh/channels.h
+++ b/usr.bin/ssh/channels.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.h,v 1.99 2009/10/28 16:38:18 reyk Exp $ */
+/* $OpenBSD: channels.h,v 1.100 2009/11/11 21:37:03 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -96,7 +96,11 @@ struct Channel {
int isatty; /* rfd is a tty */
int client_tty; /* (client) TTY has been requested */
int force_drain; /* force close on iEOF */
- int delayed; /* fdset hack */
+ int delayed; /* post-select handlers for newly created
+ * channels are delayed until the first call
+ * to a matching pre-select handler.
+ * this way post-select handlers are not
+ * accidenly called if a FD gets reused */
Buffer input; /* data read from socket, to be sent over
* encrypted connection */
Buffer output; /* data received over encrypted connection for