diff options
author | Darren Tucker <dtucker@zip.com.au> | 2012-09-06 21:19:05 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2012-09-06 21:19:05 +1000 |
commit | 66cb0e0733782c2f6773abd9fd1d87f5efef6c27 (patch) | |
tree | 88b17abef9f6bb7276066ea811fe0acbe09ec7d7 | |
parent | 3ee50c5d9f95cd40df403cf1a91fdaffefa21cc5 (diff) | |
download | openssh-git-66cb0e0733782c2f6773abd9fd1d87f5efef6c27.tar.gz |
- dtucker@cvs.openbsd.org 2012/08/17 00:45:45
[clientloop.c clientloop.h mux.c]
Force a clean shutdown of ControlMaster client sessions when the ~. escape
sequence is used. This means that ~. should now work in mux clients even
if the server is no longer responding. Found by tedu, ok djm.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | clientloop.c | 4 | ||||
-rw-r--r-- | clientloop.h | 3 | ||||
-rw-r--r-- | mux.c | 4 |
4 files changed, 12 insertions, 4 deletions
@@ -4,6 +4,11 @@ [ssh-keygen.1] a little more info on certificate validity; requested by Ross L Richardson, and provided by djm + - dtucker@cvs.openbsd.org 2012/08/17 00:45:45 + [clientloop.c clientloop.h mux.c] + Force a clean shutdown of ControlMaster client sessions when the ~. escape + sequence is used. This means that ~. should now work in mux clients even + if the server is no longer responding. Found by tedu, ok djm. 20120830 - (dtucker) [moduli] Import new moduli file. diff --git a/clientloop.c b/clientloop.c index 1c1a7708..65664cbc 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.240 2012/06/20 04:42:58 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.241 2012/08/17 00:45:45 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1046,6 +1046,8 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr, if (c && c->ctl_chan != -1) { chan_read_failed(c); chan_write_failed(c); + mux_master_session_cleanup_cb(c->self, + NULL); return 0; } else quit_pending = 1; diff --git a/clientloop.h b/clientloop.h index 3bb79487..d2baa032 100644 --- a/clientloop.h +++ b/clientloop.h @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.h,v 1.29 2011/09/09 22:46:44 djm Exp $ */ +/* $OpenBSD: clientloop.h,v 1.30 2012/08/17 00:45:45 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -76,4 +76,5 @@ void muxserver_listen(void); void muxclient(const char *); void mux_exit_message(Channel *, int); void mux_tty_alloc_failed(Channel *); +void mux_master_session_cleanup_cb(int, void *); @@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.36 2012/07/06 01:37:21 djm Exp $ */ +/* $OpenBSD: mux.c,v 1.37 2012/08/17 00:45:45 dtucker Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -188,7 +188,7 @@ static const struct { /* Cleanup callback fired on closure of mux slave _session_ channel */ /* ARGSUSED */ -static void +void mux_master_session_cleanup_cb(int cid, void *unused) { Channel *cc, *c = channel_by_id(cid); |