diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | channels.c | 18 |
2 files changed, 19 insertions, 6 deletions
@@ -92,6 +92,11 @@ | |||
92 | [servconf.c sshd.8] | 92 | [servconf.c sshd.8] |
93 | protocol 2 HostKey code default is now /etc/ssh_host_rsa_key and | 93 | protocol 2 HostKey code default is now /etc/ssh_host_rsa_key and |
94 | /etc/ssh_host_dsa_key like we have in sshd_config. ok markus@ | 94 | /etc/ssh_host_dsa_key like we have in sshd_config. ok markus@ |
95 | - markus@cvs.openbsd.org 2002/01/05 10:43:40 | ||
96 | [channels.c] | ||
97 | fix hanging x11 channels for rejected cookies (e.g. | ||
98 | XAUTHORITY=/dev/null xbiff) bug #36, based on patch from | ||
99 | djast@cs.toronto.edu | ||
95 | 100 | ||
96 | 101 | ||
97 | 20020121 | 102 | 20020121 |
@@ -7240,4 +7245,4 @@ | |||
7240 | - Wrote replacements for strlcpy and mkdtemp | 7245 | - Wrote replacements for strlcpy and mkdtemp |
7241 | - Released 1.0pre1 | 7246 | - Released 1.0pre1 |
7242 | 7247 | ||
7243 | $Id: ChangeLog,v 1.1749 2002/01/22 12:19:11 djm Exp $ | 7248 | $Id: ChangeLog,v 1.1750 2002/01/22 12:19:38 djm Exp $ |
diff --git a/channels.c b/channels.c index 4f02fc5b8..fe1db03ab 100644 --- a/channels.c +++ b/channels.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * called by a name other than "ssh" or "Secure Shell". | 13 | * called by a name other than "ssh" or "Secure Shell". |
14 | * | 14 | * |
15 | * SSH2 support added by Markus Friedl. | 15 | * SSH2 support added by Markus Friedl. |
16 | * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. | 16 | * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. |
17 | * Copyright (c) 1999 Dug Song. All rights reserved. | 17 | * Copyright (c) 1999 Dug Song. All rights reserved. |
18 | * Copyright (c) 1999 Theo de Raadt. All rights reserved. | 18 | * Copyright (c) 1999 Theo de Raadt. All rights reserved. |
19 | * | 19 | * |
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: channels.c,v 1.155 2001/12/29 21:56:01 stevesk Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.156 2002/01/05 10:43:40 markus Exp $"); |
43 | 43 | ||
44 | #include "ssh.h" | 44 | #include "ssh.h" |
45 | #include "ssh1.h" | 45 | #include "ssh1.h" |
@@ -872,9 +872,17 @@ channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset) | |||
872 | else | 872 | else |
873 | channel_pre_open_15(c, readset, writeset); | 873 | channel_pre_open_15(c, readset, writeset); |
874 | } else if (ret == -1) { | 874 | } else if (ret == -1) { |
875 | log("X11 connection rejected because of wrong authentication."); | ||
875 | debug("X11 rejected %d i%d/o%d", c->self, c->istate, c->ostate); | 876 | debug("X11 rejected %d i%d/o%d", c->self, c->istate, c->ostate); |
876 | chan_read_failed(c); /** force close? */ | 877 | chan_read_failed(c); |
877 | chan_write_failed(c); | 878 | buffer_clear(&c->input); |
879 | chan_ibuf_empty(c); | ||
880 | buffer_clear(&c->output); | ||
881 | /* for proto v1, the peer will send an IEOF */ | ||
882 | if (compat20) | ||
883 | chan_write_failed(c); | ||
884 | else | ||
885 | c->type = SSH_CHANNEL_OPEN; | ||
878 | debug("X11 closed %d i%d/o%d", c->self, c->istate, c->ostate); | 886 | debug("X11 closed %d i%d/o%d", c->self, c->istate, c->ostate); |
879 | } | 887 | } |
880 | } | 888 | } |
@@ -1807,7 +1815,7 @@ channel_input_ieof(int type, u_int32_t seq, void *ctxt) | |||
1807 | chan_rcvd_ieof(c); | 1815 | chan_rcvd_ieof(c); |
1808 | 1816 | ||
1809 | /* XXX force input close */ | 1817 | /* XXX force input close */ |
1810 | if (c->force_drain) { | 1818 | if (c->force_drain && c->istate == CHAN_INPUT_OPEN) { |
1811 | debug("channel %d: FORCE input drain", c->self); | 1819 | debug("channel %d: FORCE input drain", c->self); |
1812 | c->istate = CHAN_INPUT_WAIT_DRAIN; | 1820 | c->istate = CHAN_INPUT_WAIT_DRAIN; |
1813 | } | 1821 | } |