summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2008-05-08 12:02:23 +0000
committerdjm <djm@openbsd.org>2008-05-08 12:02:23 +0000
commit2a54096d41e5f771b9e9abd3e507c56b251eb45b (patch)
tree82781456b825c0c5df58b749a40a0fac6cb344a8 /usr.bin/ssh/ssh.c
parenttimer_due is not needed any more (diff)
downloadwireguard-openbsd-2a54096d41e5f771b9e9abd3e507c56b251eb45b.tar.xz
wireguard-openbsd-2a54096d41e5f771b9e9abd3e507c56b251eb45b.zip
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 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 91c924a9f43..7e110641b61 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.309 2008/01/19 20:51:26 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.310 2008/05/08 12:02:23 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -48,6 +48,7 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/stat.h>
+#include <sys/queue.h>
#include <ctype.h>
#include <errno.h>
@@ -1174,7 +1175,8 @@ ssh_session2_open(void)
channel_send_open(c->self);
if (!no_shell_flag)
- channel_register_confirm(c->self, ssh_session2_setup, NULL);
+ channel_register_open_confirm(c->self,
+ ssh_session2_setup, NULL);
return c->self;
}