summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-08-21 02:44:24 +1000
committerDamien Miller <djm@mindrot.org>2013-08-21 02:44:24 +1000
commit1262b6638f7d01ab110fd373dd90d915c882fe1a (patch)
treea8f3e50f3d0223f037ebf2193f11bf7d992863f7 /readconf.c
parentb7727df37efde4dbe4f5a33b19cbf42022aabf66 (diff)
- djm@cvs.openbsd.org 2013/08/20 00:11:38
[readconf.c readconf.h ssh_config.5 sshconnect.c] Add a ssh_config ProxyUseFDPass option that supports the use of ProxyCommands that establish a connection and then pass a connected file descriptor back to ssh(1). This allows the ProxyCommand to exit rather than have to shuffle data back and forth and enables ssh to use getpeername, etc. to obtain address information just like it does with regular directly-connected sockets. ok markus@
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/readconf.c b/readconf.c
index 1464430a4..7450081cd 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.204 2013/06/10 19:19:44 dtucker Exp $ */ 1/* $OpenBSD: readconf.c,v 1.205 2013/08/20 00:11:37 djm 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
@@ -137,7 +137,7 @@ typedef enum {
137 oHashKnownHosts, 137 oHashKnownHosts,
138 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, 138 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
139 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication, 139 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication,
140 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, 140 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,
141 oIgnoredUnknownOption, oDeprecated, oUnsupported 141 oIgnoredUnknownOption, oDeprecated, oUnsupported
142} OpCodes; 142} OpCodes;
143 143
@@ -249,6 +249,7 @@ static struct {
249 { "kexalgorithms", oKexAlgorithms }, 249 { "kexalgorithms", oKexAlgorithms },
250 { "ipqos", oIPQoS }, 250 { "ipqos", oIPQoS },
251 { "requesttty", oRequestTTY }, 251 { "requesttty", oRequestTTY },
252 { "proxyusefdpass", oProxyUseFdpass },
252 { "ignoreunknown", oIgnoreUnknown }, 253 { "ignoreunknown", oIgnoreUnknown },
253 254
254 { NULL, oBadOption } 255 { NULL, oBadOption }
@@ -1072,6 +1073,10 @@ parse_int:
1072 charptr = &options->ignored_unknown; 1073 charptr = &options->ignored_unknown;
1073 goto parse_string; 1074 goto parse_string;
1074 1075
1076 case oProxyUseFdpass:
1077 intptr = &options->proxy_use_fdpass;
1078 goto parse_flag;
1079
1075 case oDeprecated: 1080 case oDeprecated:
1076 debug("%s line %d: Deprecated option \"%s\"", 1081 debug("%s line %d: Deprecated option \"%s\"",
1077 filename, linenum, keyword); 1082 filename, linenum, keyword);
@@ -1233,6 +1238,7 @@ initialize_options(Options * options)
1233 options->ip_qos_interactive = -1; 1238 options->ip_qos_interactive = -1;
1234 options->ip_qos_bulk = -1; 1239 options->ip_qos_bulk = -1;
1235 options->request_tty = -1; 1240 options->request_tty = -1;
1241 options->proxy_use_fdpass = -1;
1236 options->ignored_unknown = NULL; 1242 options->ignored_unknown = NULL;
1237} 1243}
1238 1244
@@ -1385,6 +1391,8 @@ fill_default_options(Options * options)
1385 options->ip_qos_bulk = IPTOS_THROUGHPUT; 1391 options->ip_qos_bulk = IPTOS_THROUGHPUT;
1386 if (options->request_tty == -1) 1392 if (options->request_tty == -1)
1387 options->request_tty = REQUEST_TTY_AUTO; 1393 options->request_tty = REQUEST_TTY_AUTO;
1394 if (options->proxy_use_fdpass == -1)
1395 options->proxy_use_fdpass = 0;
1388 /* options->local_command should not be set by default */ 1396 /* options->local_command should not be set by default */
1389 /* options->proxy_command should not be set by default */ 1397 /* options->proxy_command should not be set by default */
1390 /* options->user will be set in the main program if appropriate */ 1398 /* options->user will be set in the main program if appropriate */