- djm@cvs.openbsd.org 2013/10/24 08:19:36

[ssh.c]
     fix bug introduced in hostname canonicalisation commit: don't try to
     resolve hostnames when a ProxyCommand is set unless the user has forced
     canonicalisation; spotted by Iain Morgan
This commit is contained in:
Damien Miller 2013-10-24 21:03:17 +11:00
parent cf31f38634
commit a90c033808
2 changed files with 10 additions and 3 deletions

View File

@ -18,6 +18,11 @@
[readconf.c servconf.c ssh_config.5 sshd_config.5] [readconf.c servconf.c ssh_config.5 sshd_config.5]
Disallow empty Match statements and add "Match all" which matches Disallow empty Match statements and add "Match all" which matches
everything. ok djm, man page help jmc@ everything. ok djm, man page help jmc@
- djm@cvs.openbsd.org 2013/10/24 08:19:36
[ssh.c]
fix bug introduced in hostname canonicalisation commit: don't try to
resolve hostnames when a ProxyCommand is set unless the user has forced
canonicalisation; spotted by Iain Morgan
20131023 20131023
- (djm) OpenBSD CVS Sync - (djm) OpenBSD CVS Sync

8
ssh.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: ssh.c,v 1.389 2013/10/23 03:05:19 djm Exp $ */ /* $OpenBSD: ssh.c,v 1.390 2013/10/24 08:19:36 djm Exp $ */
/* /*
* Author: Tatu Ylonen <ylo@cs.hut.fi> * Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -913,9 +913,11 @@ main(int ac, char **av)
/* /*
* If canonicalization not requested, or if it failed then try to * If canonicalization not requested, or if it failed then try to
* resolve the bare hostname name using the system resolver's usual * resolve the bare hostname name using the system resolver's usual
* search rules. * search rules. Skip the lookup if a ProxyCommand is being used
* unless the user has specifically requested canonicalisation.
*/ */
if (addrs == NULL) { if (addrs == NULL && (options.proxy_command == NULL ||
options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) {
if ((addrs = resolve_host(host, options.port, 1, if ((addrs = resolve_host(host, options.port, 1,
cname, sizeof(cname))) == NULL) cname, sizeof(cname))) == NULL)
cleanup_exit(255); /* resolve_host logs the error */ cleanup_exit(255); /* resolve_host logs the error */