summaryrefslogtreecommitdiff
path: root/debian/patches/fix-case-sensitive-matching.patch
blob: 820745cc10c099633754ce099a185f912bef4fa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From bdb60d16baf6d163844fc6f5f8520bc853b6611b Mon Sep 17 00:00:00 2001
From: Damien Miller <djm@mindrot.org>
Date: Tue, 4 Feb 2014 11:26:04 +1100
Subject: Unbreak case-sensitive matching of ssh_config

   - djm@cvs.openbsd.org 2014/02/04 00:24:29
     [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@

Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=d56b44d2dfa093883a5c4e91be3f72d99946b170
Bug-Debian: http://bugs.debian.org/738619
Forwarded: not-needed
Last-Update: 2014-02-11

Patch-Name: fix-case-sensitive-matching.patch
---
 ssh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ssh.c b/ssh.c
index 0cea713..5d5d4de 100644
--- a/ssh.c
+++ b/ssh.c
@@ -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);
 	/*