summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2006-07-12 22:17:10 +1000
committerDarren Tucker <dtucker@zip.com.au>2006-07-12 22:17:10 +1000
commite7d4b19f755c0d33122ef373e54b69e6b93cb0b4 (patch)
tree3fa44513bd3e58ecfdc92141bd4110cbe13c4ab5 /readconf.c
parent284706a7555b3640c78854fc64010ce956e19339 (diff)
- markus@cvs.openbsd.org 2006/07/11 18:50:48
[clientloop.c ssh.1 ssh.c channels.c ssh_config.5 readconf.h session.c channels.h readconf.c] add ExitOnForwardFailure: terminate the connection if ssh(1) cannot set up all requested dynamic, local, and remote port forwardings. ok djm, dtucker, stevesk, jmc
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/readconf.c b/readconf.c
index df5e566a5..d25f93012 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.152 2006/07/05 02:42:09 stevesk Exp $ */ 1/* $OpenBSD: readconf.c,v 1.153 2006/07/11 18:50:48 markus 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
@@ -102,6 +102,7 @@
102typedef enum { 102typedef enum {
103 oBadOption, 103 oBadOption,
104 oForwardAgent, oForwardX11, oForwardX11Trusted, oGatewayPorts, 104 oForwardAgent, oForwardX11, oForwardX11Trusted, oGatewayPorts,
105 oExitOnForwardFailure,
105 oPasswordAuthentication, oRSAAuthentication, 106 oPasswordAuthentication, oRSAAuthentication,
106 oChallengeResponseAuthentication, oXAuthLocation, 107 oChallengeResponseAuthentication, oXAuthLocation,
107 oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, 108 oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward,
@@ -132,6 +133,7 @@ static struct {
132 { "forwardagent", oForwardAgent }, 133 { "forwardagent", oForwardAgent },
133 { "forwardx11", oForwardX11 }, 134 { "forwardx11", oForwardX11 },
134 { "forwardx11trusted", oForwardX11Trusted }, 135 { "forwardx11trusted", oForwardX11Trusted },
136 { "exitonforwardfailure", oExitOnForwardFailure },
135 { "xauthlocation", oXAuthLocation }, 137 { "xauthlocation", oXAuthLocation },
136 { "gatewayports", oGatewayPorts }, 138 { "gatewayports", oGatewayPorts },
137 { "useprivilegedport", oUsePrivilegedPort }, 139 { "useprivilegedport", oUsePrivilegedPort },
@@ -386,6 +388,10 @@ parse_flag:
386 intptr = &options->gateway_ports; 388 intptr = &options->gateway_ports;
387 goto parse_flag; 389 goto parse_flag;
388 390
391 case oExitOnForwardFailure:
392 intptr = &options->exit_on_forward_failure;
393 goto parse_flag;
394
389 case oUsePrivilegedPort: 395 case oUsePrivilegedPort:
390 intptr = &options->use_privileged_port; 396 intptr = &options->use_privileged_port;
391 goto parse_flag; 397 goto parse_flag;
@@ -987,6 +993,7 @@ initialize_options(Options * options)
987 options->forward_agent = -1; 993 options->forward_agent = -1;
988 options->forward_x11 = -1; 994 options->forward_x11 = -1;
989 options->forward_x11_trusted = -1; 995 options->forward_x11_trusted = -1;
996 options->exit_on_forward_failure = -1;
990 options->xauth_location = NULL; 997 options->xauth_location = NULL;
991 options->gateway_ports = -1; 998 options->gateway_ports = -1;
992 options->use_privileged_port = -1; 999 options->use_privileged_port = -1;
@@ -1067,6 +1074,8 @@ fill_default_options(Options * options)
1067 options->forward_x11 = 0; 1074 options->forward_x11 = 0;
1068 if (options->forward_x11_trusted == -1) 1075 if (options->forward_x11_trusted == -1)
1069 options->forward_x11_trusted = 0; 1076 options->forward_x11_trusted = 0;
1077 if (options->exit_on_forward_failure == -1)
1078 options->exit_on_forward_failure = 0;
1070 if (options->xauth_location == NULL) 1079 if (options->xauth_location == NULL)
1071 options->xauth_location = _PATH_XAUTH; 1080 options->xauth_location = _PATH_XAUTH;
1072 if (options->gateway_ports == -1) 1081 if (options->gateway_ports == -1)