]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- djm@cvs.openbsd.org 2014/02/04 00:24:29
authorDamien Miller <djm@mindrot.org>
Tue, 4 Feb 2014 00:26:04 +0000 (11:26 +1100)
committerDamien Miller <djm@mindrot.org>
Tue, 4 Feb 2014 00:26:04 +0000 (11:26 +1100)
     [ssh.c]
     delay lowercasing of hostname until right before hostname
     canonicalisation to unbreak case-sensitive matching of ssh_config;
     reported by Ike Devolder; ok markus@

ssh.c

diff --git a/ssh.c b/ssh.c
index ec957333bd49e6024526a3a4d9ed72cafa8c99a3..add760ca80a81ddbc5b057af726f9630acafcabe 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.398 2014/01/31 16:39:19 tedu Exp $ */
+/* $OpenBSD: ssh.c,v 1.399 2014/02/04 00:24:29 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -780,7 +780,6 @@ main(int ac, char **av)
        if (!host)
                usage();
 
-       lowercase(host);
        host_arg = xstrdup(host);
 
        OpenSSL_add_all_algorithms();
@@ -914,6 +913,7 @@ main(int ac, char **av)
        }
 
        /* If canonicalization requested then try to apply it */
+       lowercase(host);
        if (options.canonicalize_hostname != SSH_CANONICALISE_NO)
                addrs = resolve_canonicalize(&host, options.port);
        /*