From 66cb0e0733782c2f6773abd9fd1d87f5efef6c27 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 6 Sep 2012 21:19:05 +1000 Subject: - 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. --- mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mux.c') diff --git a/mux.c b/mux.c index 5e0e65ff3..0f1532bb5 100644 --- a/mux.c +++ b/mux.c @@ -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 * @@ -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); -- cgit v1.2.3 From 73298f420efd37659f462d3eb10d8a7f71022e1b Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 9 Jan 2013 15:55:50 +1100 Subject: - djm@cvs.openbsd.org 2013/01/02 00:32:07 [clientloop.c mux.c] channel_setup_local_fwd_listener() returns 0 on failure, not -ve bz#2055 reported by mathieu.lacage AT gmail.com --- ChangeLog | 4 ++++ clientloop.c | 6 +++--- mux.c | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'mux.c') diff --git a/ChangeLog b/ChangeLog index 3a84d27ed..3b15b99c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ - dtucker@cvs.openbsd.org 2012/12/14 05:26:43 [auth.c] use correct string in error message; from rustybsd at gmx.fr + - djm@cvs.openbsd.org 2013/01/02 00:32:07 + [clientloop.c mux.c] + channel_setup_local_fwd_listener() returns 0 on failure, not -ve + bz#2055 reported by mathieu.lacage AT gmail.com 20121217 - (dtucker) [Makefile.in] Add some scaffolding so that the new regress diff --git a/clientloop.c b/clientloop.c index 564508146..c1d1d4472 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.247 2012/09/07 06:34:21 dtucker Exp $ */ +/* $OpenBSD: clientloop.c,v 1.248 2013/01/02 00:32:07 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -968,9 +968,9 @@ process_cmdline(void) goto out; } if (local || dynamic) { - if (channel_setup_local_fwd_listener(fwd.listen_host, + if (!channel_setup_local_fwd_listener(fwd.listen_host, fwd.listen_port, fwd.connect_host, - fwd.connect_port, options.gateway_ports) < 0) { + fwd.connect_port, options.gateway_ports)) { logit("Port forwarding failed."); goto out; } diff --git a/mux.c b/mux.c index 0f1532bb5..1b24660b2 100644 --- a/mux.c +++ b/mux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.37 2012/08/17 00:45:45 dtucker Exp $ */ +/* $OpenBSD: mux.c,v 1.38 2013/01/02 00:32:07 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller * @@ -738,9 +738,9 @@ process_mux_open_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r) } if (ftype == MUX_FWD_LOCAL || ftype == MUX_FWD_DYNAMIC) { - if (channel_setup_local_fwd_listener(fwd.listen_host, + if (!channel_setup_local_fwd_listener(fwd.listen_host, fwd.listen_port, fwd.connect_host, fwd.connect_port, - options.gateway_ports) < 0) { + options.gateway_ports)) { fail: logit("slave-requested %s failed", fwd_desc); buffer_put_int(r, MUX_S_FAILURE); -- cgit v1.2.3 From b87f6b70f894952b74443c8ef1b86323e7c9f465 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 23 Feb 2013 09:12:23 +1100 Subject: - (djm) [configure.ac includes.h loginrec.c mux.c sftp.c] Prefer bsd/libutil.h to libutil.h to avoid deprecation warnings on Ubuntu. ok tim --- ChangeLog | 5 +++++ configure.ac | 6 +++--- includes.h | 6 ++++-- loginrec.c | 4 ---- mux.c | 4 ---- sftp.c | 4 ---- 6 files changed, 12 insertions(+), 17 deletions(-) (limited to 'mux.c') diff --git a/ChangeLog b/ChangeLog index c8f85fd8b..4ec2282de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +20120223 + - (djm) [configure.ac includes.h loginrec.c mux.c sftp.c] Prefer + bsd/libutil.h to libutil.h to avoid deprecation warnings on Ubuntu. + ok tim + 20120222 - (dtucker) [Makefile.in configure.ac] bz#2072: don't link krb5 libs to ssh(1) since they're not needed. Patch from Pierre Ossman, ok djm. diff --git a/configure.ac b/configure.ac index e526390f7..3ea3f8a35 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.508 2013/02/22 00:37:00 djm Exp $ +# $Id: configure.ac,v 1.509 2013/02/22 22:12:24 djm Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -15,7 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) -AC_REVISION($Revision: 1.508 $) +AC_REVISION($Revision: 1.509 $) AC_CONFIG_SRCDIR([ssh.c]) AC_LANG([C]) @@ -1163,7 +1163,7 @@ AC_CHECK_FUNCS([utimes], ) dnl Checks for libutil functions -AC_CHECK_HEADERS([libutil.h]) +AC_CHECK_HEADERS([bsd/libutil.h libutil.h]) AC_SEARCH_LIBS([fmt_scaled], [util bsd]) AC_SEARCH_LIBS([login], [util bsd]) AC_SEARCH_LIBS([logout], [util bsd]) diff --git a/includes.h b/includes.h index b4c53d9b4..3e206c899 100644 --- a/includes.h +++ b/includes.h @@ -137,8 +137,10 @@ # include #endif -#ifdef HAVE_LIBUTIL_H -# include /* Openpty on FreeBSD at least */ +#if defined(HAVE_BSD_LIBUTIL_H) +# include +#elif defined(HAVE_LIBUTIL_H) +# include #endif #if defined(KRB5) && defined(USE_AFS) diff --git a/loginrec.c b/loginrec.c index 32941c985..f9662fa5c 100644 --- a/loginrec.c +++ b/loginrec.c @@ -180,10 +180,6 @@ # include #endif -#ifdef HAVE_LIBUTIL_H -# include -#endif - /** ** prototypes for helper functions in this file **/ diff --git a/mux.c b/mux.c index 1b24660b2..1ae0e0915 100644 --- a/mux.c +++ b/mux.c @@ -63,10 +63,6 @@ # include #endif -#ifdef HAVE_LIBUTIL_H -# include -#endif - #include "openbsd-compat/sys-queue.h" #include "xmalloc.h" #include "log.h" diff --git a/sftp.c b/sftp.c index 9a53b12b7..342ae7efc 100644 --- a/sftp.c +++ b/sftp.c @@ -54,10 +54,6 @@ typedef void EditLine; # include #endif -#ifdef HAVE_LIBUTIL_H -# include -#endif - #include "xmalloc.h" #include "log.h" #include "pathnames.h" -- cgit v1.2.3