summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-05-19 16:05:41 +1000
committerDamien Miller <djm@mindrot.org>2008-05-19 16:05:41 +1000
commitd654dd27b5774575edd341827c38735ac9222174 (patch)
tree9a26f5f81100f4e092dcdabff65d46397b692bd1
parent2ff1ca56ebee93d2881e4abaab1b8bc84dad4db8 (diff)
- markus@cvs.openbsd.org 2008/05/09 16:17:51
[channels.c] error-fd race: don't enable the error fd in the select bitmask for channels with both in- and output closed, since the channel will go away before we call select(); report, lots of debugging help and ok djm@
-rw-r--r--ChangeLog8
-rw-r--r--channels.c5
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 513fbe243..fd75c3404 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -127,6 +127,12 @@
127 a SIGPIPE when the forked program does a write. 127 a SIGPIPE when the forked program does a write.
128 ok djm@ 128 ok djm@
129 (Id sync only, USE_PIPES never left portable OpenSSH) 129 (Id sync only, USE_PIPES never left portable OpenSSH)
130 - markus@cvs.openbsd.org 2008/05/09 16:17:51
131 [channels.c]
132 error-fd race: don't enable the error fd in the select bitmask
133 for channels with both in- and output closed, since the channel
134 will go away before we call select();
135 report, lots of debugging help and ok djm@
130 136
13120080403 13720080403
132 - (djm) [openbsd-compat/bsd-poll.c] Include stdlib.h to avoid compile- 138 - (djm) [openbsd-compat/bsd-poll.c] Include stdlib.h to avoid compile-
@@ -3987,4 +3993,4 @@
3987 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3993 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3988 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3994 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3989 3995
3990$Id: ChangeLog,v 1.4928 2008/05/19 06:04:56 djm Exp $ 3996$Id: ChangeLog,v 1.4929 2008/05/19 06:05:41 djm Exp $
diff --git a/channels.c b/channels.c
index 1e57951dc..99b23d75f 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.276 2008/05/09 04:55:56 djm Exp $ */ 1/* $OpenBSD: channels.c,v 1.277 2008/05/09 16:17:51 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -819,7 +819,8 @@ channel_pre_open(Channel *c, fd_set *readset, fd_set *writeset)
819 } 819 }
820 } 820 }
821 /** XXX check close conditions, too */ 821 /** XXX check close conditions, too */
822 if (compat20 && c->efd != -1) { 822 if (compat20 && c->efd != -1 &&
823 !(c->istate == CHAN_INPUT_CLOSED && c->ostate == CHAN_OUTPUT_CLOSED)) {
823 if (c->extended_usage == CHAN_EXTENDED_WRITE && 824 if (c->extended_usage == CHAN_EXTENDED_WRITE &&
824 buffer_len(&c->extended) > 0) 825 buffer_len(&c->extended) > 0)
825 FD_SET(c->efd, writeset); 826 FD_SET(c->efd, writeset);