diff options
author | Damien Miller <djm@mindrot.org> | 2013-10-24 21:03:17 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-10-24 21:03:17 +1100 |
commit | a90c0338083ee0e4064c4bdf61f497293a699be0 (patch) | |
tree | fd77578aff45ce3bb9c77f114e082b412f04342d | |
parent | cf31f3863425453ffcda540fbefa9df80088c8d1 (diff) |
- 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh.c | 8 |
2 files changed, 10 insertions, 3 deletions
@@ -18,6 +18,11 @@ | |||
18 | [readconf.c servconf.c ssh_config.5 sshd_config.5] | 18 | [readconf.c servconf.c ssh_config.5 sshd_config.5] |
19 | Disallow empty Match statements and add "Match all" which matches | 19 | Disallow empty Match statements and add "Match all" which matches |
20 | everything. ok djm, man page help jmc@ | 20 | everything. ok djm, man page help jmc@ |
21 | - djm@cvs.openbsd.org 2013/10/24 08:19:36 | ||
22 | [ssh.c] | ||
23 | fix bug introduced in hostname canonicalisation commit: don't try to | ||
24 | resolve hostnames when a ProxyCommand is set unless the user has forced | ||
25 | canonicalisation; spotted by Iain Morgan | ||
21 | 26 | ||
22 | 20131023 | 27 | 20131023 |
23 | - (djm) OpenBSD CVS Sync | 28 | - (djm) OpenBSD CVS Sync |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.389 2013/10/23 03:05:19 djm Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.390 2013/10/24 08:19: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 |
@@ -913,9 +913,11 @@ main(int ac, char **av) | |||
913 | /* | 913 | /* |
914 | * If canonicalization not requested, or if it failed then try to | 914 | * If canonicalization not requested, or if it failed then try to |
915 | * resolve the bare hostname name using the system resolver's usual | 915 | * resolve the bare hostname name using the system resolver's usual |
916 | * search rules. | 916 | * search rules. Skip the lookup if a ProxyCommand is being used |
917 | * unless the user has specifically requested canonicalisation. | ||
917 | */ | 918 | */ |
918 | if (addrs == NULL) { | 919 | if (addrs == NULL && (options.proxy_command == NULL || |
920 | options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) { | ||
919 | if ((addrs = resolve_host(host, options.port, 1, | 921 | if ((addrs = resolve_host(host, options.port, 1, |
920 | cname, sizeof(cname))) == NULL) | 922 | cname, sizeof(cname))) == NULL) |
921 | cleanup_exit(255); /* resolve_host logs the error */ | 923 | cleanup_exit(255); /* resolve_host logs the error */ |