diff options
author | Darren Tucker <dtucker@zip.com.au> | 2010-01-08 17:08:00 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2010-01-08 17:08:00 +1100 |
commit | 876045b0fb273ee11b02c535833b076c875253dc (patch) | |
tree | 372ba1e8310e20e1874a5aac76ed3a7194aec9cb /channels.h | |
parent | 6e7fe1c01b8a69099ffc42e653cc478509e84781 (diff) |
- markus@cvs.openbsd.org 2009/11/11 21:37:03
[channels.c channels.h]
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 'channels.h')
-rw-r--r-- | channels.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/channels.h b/channels.h index b0f5dc321..4dbeeb6e1 100644 --- a/channels.h +++ b/channels.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: channels.h,v 1.99 2009/10/28 16:38:18 reyk Exp $ */ | 1 | /* $OpenBSD: channels.h,v 1.100 2009/11/11 21:37:03 markus Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -97,7 +97,11 @@ struct Channel { | |||
97 | int wfd_isatty; /* wfd is a tty */ | 97 | int wfd_isatty; /* wfd is a tty */ |
98 | int client_tty; /* (client) TTY has been requested */ | 98 | int client_tty; /* (client) TTY has been requested */ |
99 | int force_drain; /* force close on iEOF */ | 99 | int force_drain; /* force close on iEOF */ |
100 | int delayed; /* fdset hack */ | 100 | int delayed; /* post-select handlers for newly created |
101 | * channels are delayed until the first call | ||
102 | * to a matching pre-select handler. | ||
103 | * this way post-select handlers are not | ||
104 | * accidenly called if a FD gets reused */ | ||
101 | Buffer input; /* data read from socket, to be sent over | 105 | Buffer input; /* data read from socket, to be sent over |
102 | * encrypted connection */ | 106 | * encrypted connection */ |
103 | Buffer output; /* data received over encrypted connection for | 107 | Buffer output; /* data received over encrypted connection for |