summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-05-19 15:05:07 +1000
committerDamien Miller <djm@mindrot.org>2008-05-19 15:05:07 +1000
commitb84886ba3e362f54b70aefcbe1aa10606309b7d7 (patch)
tree9346734369c4e527eca83c87a89c05df0ffe4a18 /serverloop.c
parentdb255cad0531047a3e35a95af74ad2e03b054412 (diff)
- djm@cvs.openbsd.org 2008/05/08 12:02:23
[auth-options.c auth1.c channels.c channels.h clientloop.c gss-serv.c] [monitor.c monitor_wrap.c nchan.c servconf.c serverloop.c session.c] [ssh.c sshd.c] Implement a channel success/failure status confirmation callback mechanism. Each channel maintains a queue of callbacks, which will be drained in order (RFC4253 guarantees confirm messages are not reordered within an channel). Also includes a abandonment callback to clean up if a channel is closed without sending confirmation messages. This probably shouldn't happen in compliant implementations, but it could be abused to leak memory. ok markus@ (as part of a larger diff)
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/serverloop.c b/serverloop.c
index bf3f9c9f0..20991c3ce 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.148 2008/02/22 20:44:02 dtucker Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.149 2008/05/08 12:02:23 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
@@ -56,6 +56,7 @@
56#include <unistd.h> 56#include <unistd.h>
57#include <stdarg.h> 57#include <stdarg.h>
58 58
59#include "openbsd-compat/sys-queue.h"
59#include "xmalloc.h" 60#include "xmalloc.h"
60#include "packet.h" 61#include "packet.h"
61#include "buffer.h" 62#include "buffer.h"
@@ -1188,8 +1189,9 @@ server_init_dispatch_20(void)
1188 dispatch_set(SSH2_MSG_CHANNEL_REQUEST, &server_input_channel_req); 1189 dispatch_set(SSH2_MSG_CHANNEL_REQUEST, &server_input_channel_req);
1189 dispatch_set(SSH2_MSG_CHANNEL_WINDOW_ADJUST, &channel_input_window_adjust); 1190 dispatch_set(SSH2_MSG_CHANNEL_WINDOW_ADJUST, &channel_input_window_adjust);
1190 dispatch_set(SSH2_MSG_GLOBAL_REQUEST, &server_input_global_request); 1191 dispatch_set(SSH2_MSG_GLOBAL_REQUEST, &server_input_global_request);
1192 dispatch_set(SSH2_MSG_CHANNEL_SUCCESS, &channel_input_status_confirm);
1193 dispatch_set(SSH2_MSG_CHANNEL_FAILURE, &channel_input_status_confirm);
1191 /* client_alive */ 1194 /* client_alive */
1192 dispatch_set(SSH2_MSG_CHANNEL_FAILURE, &server_input_keep_alive);
1193 dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &server_input_keep_alive); 1195 dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &server_input_keep_alive);
1194 dispatch_set(SSH2_MSG_REQUEST_FAILURE, &server_input_keep_alive); 1196 dispatch_set(SSH2_MSG_REQUEST_FAILURE, &server_input_keep_alive);
1195 /* rekeying */ 1197 /* rekeying */