summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--channels.c4
-rw-r--r--clientloop.c7
-rw-r--r--clientloop.h3
-rw-r--r--ssh.c26
5 files changed, 41 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 62e88bc37..82632dbec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,11 @@
24 - markus@cvs.openbsd.org 2002/04/22 16:16:53 24 - markus@cvs.openbsd.org 2002/04/22 16:16:53
25 [servconf.c sshd.8 sshd_config] 25 [servconf.c sshd.8 sshd_config]
26 do not auto-enable KerberosAuthentication; ok djm@, provos@, deraadt@ 26 do not auto-enable KerberosAuthentication; ok djm@, provos@, deraadt@
27 - markus@cvs.openbsd.org 2002/04/22 21:04:52
28 [channels.c clientloop.c clientloop.h ssh.c]
29 request reply (success/failure) for -R style fwd in protocol v2,
30 depends on ordered replies.
31 fixes http://bugzilla.mindrot.org/show_bug.cgi?id=215; ok provos@
27 32
2820020421 3320020421
29 - (tim) [entropy.c.] Portability fix for SCO Unix 3.2v4.x (SCO OSR 3.0). 34 - (tim) [entropy.c.] Portability fix for SCO Unix 3.2v4.x (SCO OSR 3.0).
@@ -8290,4 +8295,4 @@
8290 - Wrote replacements for strlcpy and mkdtemp 8295 - Wrote replacements for strlcpy and mkdtemp
8291 - Released 1.0pre1 8296 - Released 1.0pre1
8292 8297
8293$Id: ChangeLog,v 1.2069 2002/04/23 11:04:51 djm Exp $ 8298$Id: ChangeLog,v 1.2070 2002/04/23 11:09:44 djm Exp $
diff --git a/channels.c b/channels.c
index 95817624f..520bff822 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.172 2002/03/25 21:13:51 markus Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.173 2002/04/22 21:04:52 markus Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -2130,7 +2130,7 @@ channel_request_remote_forwarding(u_short listen_port,
2130 const char *address_to_bind = "0.0.0.0"; 2130 const char *address_to_bind = "0.0.0.0";
2131 packet_start(SSH2_MSG_GLOBAL_REQUEST); 2131 packet_start(SSH2_MSG_GLOBAL_REQUEST);
2132 packet_put_cstring("tcpip-forward"); 2132 packet_put_cstring("tcpip-forward");
2133 packet_put_char(0); /* boolean: want reply */ 2133 packet_put_char(1); /* boolean: want reply */
2134 packet_put_cstring(address_to_bind); 2134 packet_put_cstring(address_to_bind);
2135 packet_put_int(listen_port); 2135 packet_put_int(listen_port);
2136 packet_send(); 2136 packet_send();
diff --git a/clientloop.c b/clientloop.c
index 7644ff39c..15945a80d 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.99 2002/03/21 23:07:37 markus Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.100 2002/04/22 21:04:52 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -1314,6 +1314,7 @@ static void
1314client_init_dispatch_20(void) 1314client_init_dispatch_20(void)
1315{ 1315{
1316 dispatch_init(&dispatch_protocol_error); 1316 dispatch_init(&dispatch_protocol_error);
1317
1317 dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose); 1318 dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose);
1318 dispatch_set(SSH2_MSG_CHANNEL_DATA, &channel_input_data); 1319 dispatch_set(SSH2_MSG_CHANNEL_DATA, &channel_input_data);
1319 dispatch_set(SSH2_MSG_CHANNEL_EOF, &channel_input_ieof); 1320 dispatch_set(SSH2_MSG_CHANNEL_EOF, &channel_input_ieof);
@@ -1327,6 +1328,10 @@ client_init_dispatch_20(void)
1327 1328
1328 /* rekeying */ 1329 /* rekeying */
1329 dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit); 1330 dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit);
1331
1332 /* global request reply messages */
1333 dispatch_set(SSH2_MSG_REQUEST_FAILURE, &client_global_request_reply);
1334 dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &client_global_request_reply);
1330} 1335}
1331static void 1336static void
1332client_init_dispatch_13(void) 1337client_init_dispatch_13(void)
diff --git a/clientloop.h b/clientloop.h
index 1bc9a9523..8056a40c3 100644
--- a/clientloop.h
+++ b/clientloop.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.h,v 1.6 2001/06/26 17:27:23 markus Exp $ */ 1/* $OpenBSD: clientloop.h,v 1.7 2002/04/22 21:04:52 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -37,3 +37,4 @@
37 37
38/* Client side main loop for the interactive session. */ 38/* Client side main loop for the interactive session. */
39int client_loop(int, int, int); 39int client_loop(int, int, int);
40void client_global_request_reply(int type, u_int32_t seq, void *ctxt);
diff --git a/ssh.c b/ssh.c
index c89b4135d..afaf20bec 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: ssh.c,v 1.169 2002/03/26 11:37:05 markus Exp $"); 43RCSID("$OpenBSD: ssh.c,v 1.170 2002/04/22 21:04:52 markus Exp $");
44 44
45#include <openssl/evp.h> 45#include <openssl/evp.h>
46#include <openssl/err.h> 46#include <openssl/err.h>
@@ -146,6 +146,9 @@ Buffer command;
146/* Should we execute a command or invoke a subsystem? */ 146/* Should we execute a command or invoke a subsystem? */
147int subsystem_flag = 0; 147int subsystem_flag = 0;
148 148
149/* # of replies received for global requests */
150static int client_global_request_id = 0;
151
149/* Prints a help message to the user. This function never returns. */ 152/* Prints a help message to the user. This function never returns. */
150 153
151static void 154static void
@@ -1041,6 +1044,27 @@ client_subsystem_reply(int type, u_int32_t seq, void *ctxt)
1041 len, (u_char *)buffer_ptr(&command), id); 1044 len, (u_char *)buffer_ptr(&command), id);
1042} 1045}
1043 1046
1047void
1048client_global_request_reply(int type, u_int32_t seq, void *ctxt)
1049{
1050 int i;
1051
1052 i = client_global_request_id++;
1053 if (i >= options.num_remote_forwards) {
1054 debug("client_global_request_reply: too many replies %d > %d",
1055 i, options.num_remote_forwards);
1056 return;
1057 }
1058 debug("remote forward %s for: listen %d, connect %s:%d",
1059 type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure",
1060 options.remote_forwards[i].port,
1061 options.remote_forwards[i].host,
1062 options.remote_forwards[i].host_port);
1063 if (type == SSH2_MSG_REQUEST_FAILURE)
1064 log("Warning: remote port forwarding failed for listen port %d",
1065 options.remote_forwards[i].port);
1066}
1067
1044/* request pty/x11/agent/tcpfwd/shell for channel */ 1068/* request pty/x11/agent/tcpfwd/shell for channel */
1045static void 1069static void
1046ssh_session2_setup(int id, void *arg) 1070ssh_session2_setup(int id, void *arg)