*/
#include "includes.h"
-RCSID("$OpenBSD: serverloop.c,v 1.53 2001/03/02 18:54:31 deraadt Exp $");
+RCSID("$OpenBSD: serverloop.c,v 1.56 2001/04/04 14:34:58 markus Exp $");
#include "xmalloc.h"
#include "packet.h"
#include "auth-options.h"
#include "serverloop.h"
#include "misc.h"
+#include "kex.h"
extern ServerOptions options;
+/* XXX */
+extern Kex *xxx_kex;
+
static Buffer stdin_buffer; /* Buffer for stdin data. */
static Buffer stdout_buffer; /* Buffer for stdout data. */
static Buffer stderr_buffer; /* Buffer for stderr data. */
void
process_buffered_input_packets(void)
{
- dispatch_run(DISPATCH_NONBLOCK, NULL, NULL);
+ dispatch_run(DISPATCH_NONBLOCK, NULL, compat20 ? xxx_kex : NULL);
}
/*
child_pid = pid;
child_terminated = 0;
signal(SIGCHLD, sigchld_handler);
- signal(SIGPIPE, SIG_IGN);
/* Initialize our global variables. */
fdin = fdin_arg;
debug("Entering interactive session for SSH2.");
mysignal(SIGCHLD, sigchld_handler2);
- signal(SIGPIPE, SIG_IGN);
child_terminated = 0;
connection_in = packet_get_connection_in();
connection_out = packet_get_connection_out();
originator, originator_port, target, target_port);
/* XXX check permission */
- if (no_port_forwarding_flag || !options.allow_tcp_forwarding) {
- xfree(target);
- xfree(originator);
- return NULL;
- }
sock = channel_connect_to(target, target_port);
xfree(target);
xfree(originator);
want_reply = packet_get_char();
debug("server_input_global_request: rtype %s want_reply %d", rtype, want_reply);
+ /* -R style forwarding */
if (strcmp(rtype, "tcpip-forward") == 0) {
struct passwd *pw;
char *listen_address;
dispatch_set(SSH2_MSG_CHANNEL_REQUEST, &channel_input_channel_request);
dispatch_set(SSH2_MSG_CHANNEL_WINDOW_ADJUST, &channel_input_window_adjust);
dispatch_set(SSH2_MSG_GLOBAL_REQUEST, &server_input_global_request);
+
+ /* rekeying */
+ dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit);
}
void
server_init_dispatch_13(void)