summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--readconf.c20
-rw-r--r--ssh.19
-rw-r--r--ssh.c4
3 files changed, 22 insertions, 11 deletions
diff --git a/readconf.c b/readconf.c
index 66a36a49f..9dcc383da 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.255 2016/06/03 03:14:41 dtucker Exp $ */ 1/* $OpenBSD: readconf.c,v 1.256 2016/06/03 04:09:38 dtucker 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
@@ -1750,6 +1750,7 @@ initialize_options(Options * options)
1750 options->forward_x11_timeout = -1; 1750 options->forward_x11_timeout = -1;
1751 options->stdio_forward_host = NULL; 1751 options->stdio_forward_host = NULL;
1752 options->stdio_forward_port = 0; 1752 options->stdio_forward_port = 0;
1753 options->clear_forwardings = -1;
1753 options->exit_on_forward_failure = -1; 1754 options->exit_on_forward_failure = -1;
1754 options->xauth_location = NULL; 1755 options->xauth_location = NULL;
1755 options->fwd_opts.gateway_ports = -1; 1756 options->fwd_opts.gateway_ports = -1;
@@ -1796,7 +1797,6 @@ initialize_options(Options * options)
1796 options->num_local_forwards = 0; 1797 options->num_local_forwards = 0;
1797 options->remote_forwards = NULL; 1798 options->remote_forwards = NULL;
1798 options->num_remote_forwards = 0; 1799 options->num_remote_forwards = 0;
1799 options->clear_forwardings = -1;
1800 options->log_level = SYSLOG_LEVEL_NOT_SET; 1800 options->log_level = SYSLOG_LEVEL_NOT_SET;
1801 options->preferred_authentications = NULL; 1801 options->preferred_authentications = NULL;
1802 options->bind_address = NULL; 1802 options->bind_address = NULL;
@@ -1870,8 +1870,19 @@ fill_default_options(Options * options)
1870 options->forward_x11_trusted = 0; 1870 options->forward_x11_trusted = 0;
1871 if (options->forward_x11_timeout == -1) 1871 if (options->forward_x11_timeout == -1)
1872 options->forward_x11_timeout = 1200; 1872 options->forward_x11_timeout = 1200;
1873 /*
1874 * stdio forwarding (-W) changes the default for these but we defer
1875 * setting the values so they can be overridden.
1876 */
1873 if (options->exit_on_forward_failure == -1) 1877 if (options->exit_on_forward_failure == -1)
1874 options->exit_on_forward_failure = 0; 1878 options->exit_on_forward_failure =
1879 options->stdio_forward_host != NULL ? 1 : 0;
1880 if (options->clear_forwardings == -1)
1881 options->clear_forwardings =
1882 options->stdio_forward_host != NULL ? 1 : 0;
1883 if (options->clear_forwardings == 1)
1884 clear_forwardings(options);
1885
1875 if (options->xauth_location == NULL) 1886 if (options->xauth_location == NULL)
1876 options->xauth_location = _PATH_XAUTH; 1887 options->xauth_location = _PATH_XAUTH;
1877 if (options->fwd_opts.gateway_ports == -1) 1888 if (options->fwd_opts.gateway_ports == -1)
@@ -1962,8 +1973,6 @@ fill_default_options(Options * options)
1962 } 1973 }
1963 if (options->log_level == SYSLOG_LEVEL_NOT_SET) 1974 if (options->log_level == SYSLOG_LEVEL_NOT_SET)
1964 options->log_level = SYSLOG_LEVEL_INFO; 1975 options->log_level = SYSLOG_LEVEL_INFO;
1965 if (options->clear_forwardings == 1)
1966 clear_forwardings(options);
1967 if (options->no_host_authentication_for_localhost == - 1) 1976 if (options->no_host_authentication_for_localhost == - 1)
1968 options->no_host_authentication_for_localhost = 0; 1977 options->no_host_authentication_for_localhost = 0;
1969 if (options->identities_only == -1) 1978 if (options->identities_only == -1)
@@ -2424,6 +2433,7 @@ dump_client_config(Options *o, const char *host)
2424 dump_cfg_fmtint(oCompression, o->compression); 2433 dump_cfg_fmtint(oCompression, o->compression);
2425 dump_cfg_fmtint(oControlMaster, o->control_master); 2434 dump_cfg_fmtint(oControlMaster, o->control_master);
2426 dump_cfg_fmtint(oEnableSSHKeysign, o->enable_ssh_keysign); 2435 dump_cfg_fmtint(oEnableSSHKeysign, o->enable_ssh_keysign);
2436 dump_cfg_fmtint(oClearAllForwardings, o->clear_forwardings);
2427 dump_cfg_fmtint(oExitOnForwardFailure, o->exit_on_forward_failure); 2437 dump_cfg_fmtint(oExitOnForwardFailure, o->exit_on_forward_failure);
2428 dump_cfg_fmtint(oFingerprintHash, o->fingerprint_hash); 2438 dump_cfg_fmtint(oFingerprintHash, o->fingerprint_hash);
2429 dump_cfg_fmtint(oForwardAgent, o->forward_agent); 2439 dump_cfg_fmtint(oForwardAgent, o->forward_agent);
diff --git a/ssh.1 b/ssh.1
index 9ed5a5662..4c5ab2157 100644
--- a/ssh.1
+++ b/ssh.1
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: ssh.1,v 1.371 2016/05/04 12:21:53 markus Exp $ 36.\" $OpenBSD: ssh.1,v 1.372 2016/06/03 04:09:39 dtucker Exp $
37.Dd $Mdocdate: May 4 2016 $ 37.Dd $Mdocdate: June 3 2016 $
38.Dt SSH 1 38.Dt SSH 1
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -709,7 +709,10 @@ Implies
709.Fl T , 709.Fl T ,
710.Cm ExitOnForwardFailure 710.Cm ExitOnForwardFailure
711and 711and
712.Cm ClearAllForwardings . 712.Cm ClearAllForwardings
713although these can be overridden in the configuration file or
714.Fl o
715command line options.
713.Pp 716.Pp
714.It Fl w Xo 717.It Fl w Xo
715.Ar local_tun Ns Op : Ns Ar remote_tun 718.Ar local_tun Ns Op : Ns Ar remote_tun
diff --git a/ssh.c b/ssh.c
index 702631c76..e7d4fd915 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.441 2016/06/03 03:14:41 dtucker Exp $ */ 1/* $OpenBSD: ssh.c,v 1.442 2016/06/03 04:09:39 dtucker 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
@@ -782,8 +782,6 @@ main(int ac, char **av)
782 } 782 }
783 options.request_tty = REQUEST_TTY_NO; 783 options.request_tty = REQUEST_TTY_NO;
784 no_shell_flag = 1; 784 no_shell_flag = 1;
785 options.clear_forwardings = 1;
786 options.exit_on_forward_failure = 1;
787 break; 785 break;
788 case 'q': 786 case 'q':
789 options.log_level = SYSLOG_LEVEL_QUIET; 787 options.log_level = SYSLOG_LEVEL_QUIET;