diff options
author | djm@openbsd.org <djm@openbsd.org> | 2018-09-21 03:11:36 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-09-21 13:12:48 +1000 |
commit | 383a33d160cefbfd1b40fef81f72eadbf9303a66 (patch) | |
tree | 720b310b9cd71d6b565ac993c8b0741e1aaeffd8 | |
parent | 0cbed248ed81584129b67c348dbb801660f25a6a (diff) |
upstream: Treat connections with ProxyJump specified the same as ones
with a ProxyCommand set with regards to hostname canonicalisation (i.e. don't
try to canonicalise the hostname unless CanonicalizeHostname is set to
'always').
Patch from Sven Wegener via bz#2896
OpenBSD-Commit-ID: 527ff501cf98bf65fb4b29ed0cb847dda10f4d37
-rw-r--r-- | ssh.c | 7 | ||||
-rw-r--r-- | ssh_config.5 | 8 |
2 files changed, 8 insertions, 7 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.492 2018/09/20 03:31:49 djm Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.493 2018/09/21 03:11:36 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 |
@@ -1137,10 +1137,9 @@ main(int ac, char **av) | |||
1137 | if (addrs == NULL && options.num_permitted_cnames != 0 && (direct || | 1137 | if (addrs == NULL && options.num_permitted_cnames != 0 && (direct || |
1138 | options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) { | 1138 | options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) { |
1139 | if ((addrs = resolve_host(host, options.port, | 1139 | if ((addrs = resolve_host(host, options.port, |
1140 | option_clear_or_none(options.proxy_command), | 1140 | direct, cname, sizeof(cname))) == NULL) { |
1141 | cname, sizeof(cname))) == NULL) { | ||
1142 | /* Don't fatal proxied host names not in the DNS */ | 1141 | /* Don't fatal proxied host names not in the DNS */ |
1143 | if (option_clear_or_none(options.proxy_command)) | 1142 | if (direct) |
1144 | cleanup_exit(255); /* logged in resolve_host */ | 1143 | cleanup_exit(255); /* logged in resolve_host */ |
1145 | } else | 1144 | } else |
1146 | check_follow_cname(direct, &host, cname); | 1145 | check_follow_cname(direct, &host, cname); |
diff --git a/ssh_config.5 b/ssh_config.5 index c7192665f..2df1165f1 100644 --- a/ssh_config.5 +++ b/ssh_config.5 | |||
@@ -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_config.5,v 1.283 2018/09/20 06:58:48 jmc Exp $ | 36 | .\" $OpenBSD: ssh_config.5,v 1.284 2018/09/21 03:11:36 djm Exp $ |
37 | .Dd $Mdocdate: September 20 2018 $ | 37 | .Dd $Mdocdate: September 21 2018 $ |
38 | .Dt SSH_CONFIG 5 | 38 | .Dt SSH_CONFIG 5 |
39 | .Os | 39 | .Os |
40 | .Sh NAME | 40 | .Sh NAME |
@@ -290,7 +290,9 @@ hostname lookups. | |||
290 | If set to | 290 | If set to |
291 | .Cm yes | 291 | .Cm yes |
292 | then, for connections that do not use a | 292 | then, for connections that do not use a |
293 | .Cm ProxyCommand , | 293 | .Cm ProxyCommand |
294 | or | ||
295 | .Cm ProxyJump , | ||
294 | .Xr ssh 1 | 296 | .Xr ssh 1 |
295 | will attempt to canonicalize the hostname specified on the command line | 297 | will attempt to canonicalize the hostname specified on the command line |
296 | using the | 298 | using the |