diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | clientloop.c | 4 | ||||
-rw-r--r-- | serverloop.c | 4 |
3 files changed, 9 insertions, 4 deletions
@@ -31,6 +31,11 @@ | |||
31 | buffer_get_string_ptr's return should be const to remind | 31 | buffer_get_string_ptr's return should be const to remind |
32 | callers that futzing with it will futz with the actual buffer | 32 | callers that futzing with it will futz with the actual buffer |
33 | contents | 33 | contents |
34 | - djm@cvs.openbsd.org 2014/04/29 13:10:30 | ||
35 | [clientloop.c serverloop.c] | ||
36 | bz#1818 - don't send channel success/failre replies on channels that | ||
37 | have sent a close already; analysis and patch from Simon Tatham; | ||
38 | ok markus@ | ||
34 | 39 | ||
35 | 20140430 | 40 | 20140430 |
36 | - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already | 41 | - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already |
diff --git a/clientloop.c b/clientloop.c index 59ad3a2c3..203151ea8 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: clientloop.c,v 1.258 2014/02/02 03:44:31 djm Exp $ */ | 1 | /* $OpenBSD: clientloop.c,v 1.259 2014/04/29 13:10:30 djm 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 |
@@ -2054,7 +2054,7 @@ client_input_channel_req(int type, u_int32_t seq, void *ctxt) | |||
2054 | } | 2054 | } |
2055 | packet_check_eom(); | 2055 | packet_check_eom(); |
2056 | } | 2056 | } |
2057 | if (reply && c != NULL) { | 2057 | if (reply && c != NULL && !(c->flags & CHAN_CLOSE_SENT)) { |
2058 | packet_start(success ? | 2058 | packet_start(success ? |
2059 | SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE); | 2059 | SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE); |
2060 | packet_put_int(c->remote_id); | 2060 | packet_put_int(c->remote_id); |
diff --git a/serverloop.c b/serverloop.c index 2f8e3a06a..6c4b2b512 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: serverloop.c,v 1.170 2014/02/02 03:44:31 djm Exp $ */ | 1 | /* $OpenBSD: serverloop.c,v 1.171 2014/04/29 13:10:30 djm 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 |
@@ -1204,7 +1204,7 @@ server_input_channel_req(int type, u_int32_t seq, void *ctxt) | |||
1204 | } else if ((c->type == SSH_CHANNEL_LARVAL || | 1204 | } else if ((c->type == SSH_CHANNEL_LARVAL || |
1205 | c->type == SSH_CHANNEL_OPEN) && strcmp(c->ctype, "session") == 0) | 1205 | c->type == SSH_CHANNEL_OPEN) && strcmp(c->ctype, "session") == 0) |
1206 | success = session_input_channel_req(c, rtype); | 1206 | success = session_input_channel_req(c, rtype); |
1207 | if (reply) { | 1207 | if (reply && !(c->flags & CHAN_CLOSE_SENT)) { |
1208 | packet_start(success ? | 1208 | packet_start(success ? |
1209 | SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE); | 1209 | SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE); |
1210 | packet_put_int(c->remote_id); | 1210 | packet_put_int(c->remote_id); |