summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c20
1 files changed, 15 insertions, 5 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);