summaryrefslogtreecommitdiff
path: root/debian/patches/ssh-keyscan-hash-port.patch
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2017-04-02 01:26:17 +0100
committerColin Watson <cjwatson@debian.org>2017-04-02 01:54:08 +0100
commit20adc7e0fc13ff9c7d270db250aac1fa140e3851 (patch)
tree5d9f06b0ff195db88093037d9102f0cdcf3884c6 /debian/patches/ssh-keyscan-hash-port.patch
parentaf27669f905133925224acc753067dea710881dd (diff)
parentec338656a3d6b21bb87f3b6367b232d297f601e5 (diff)
New upstream release (7.5p1)
Diffstat (limited to 'debian/patches/ssh-keyscan-hash-port.patch')
-rw-r--r--debian/patches/ssh-keyscan-hash-port.patch48
1 files changed, 0 insertions, 48 deletions
diff --git a/debian/patches/ssh-keyscan-hash-port.patch b/debian/patches/ssh-keyscan-hash-port.patch
deleted file mode 100644
index 32a2f6a01..000000000
--- a/debian/patches/ssh-keyscan-hash-port.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From a0f9daa9c3cc2b37b9707b228263eb717d201371 Mon Sep 17 00:00:00 2001
2From: "djm@openbsd.org" <djm@openbsd.org>
3Date: Fri, 10 Mar 2017 03:18:24 +0000
4Subject: upstream commit
5
6correctly hash hosts with a port number. Reported by Josh
7Powers in bz#2692; ok dtucker@
8
9Upstream-ID: 468e357ff143e00acc05bdd2803a696b3d4b6442
10
11Origin: https://anongit.mindrot.org/openssh.git/commit/?id=8a2834454c73dfc1eb96453c0e97690595f3f4c2
12Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2692
13Bug-Debian: https://bugs.debian.org/857736
14Bug-Ubuntu: https://bugs.launchpad.net/bugs/1670745
15Last-Update: 2017-03-14
16
17Patch-Name: ssh-keyscan-hash-port.patch
18---
19 ssh-keyscan.c | 11 ++++++-----
20 1 file changed, 6 insertions(+), 5 deletions(-)
21
22diff --git a/ssh-keyscan.c b/ssh-keyscan.c
23index c30d54e6..24b51ff1 100644
24--- a/ssh-keyscan.c
25+++ b/ssh-keyscan.c
26@@ -321,16 +321,17 @@ keygrab_ssh2(con *c)
27 }
28
29 static void
30-keyprint_one(char *host, struct sshkey *key)
31+keyprint_one(const char *host, struct sshkey *key)
32 {
33 char *hostport;
34-
35- if (hash_hosts && (host = host_hash(host, NULL, 0)) == NULL)
36- fatal("host_hash failed");
37+ const char *known_host, *hashed;
38
39 hostport = put_host_port(host, ssh_port);
40+ if (hash_hosts && (hashed = host_hash(host, NULL, 0)) == NULL)
41+ fatal("host_hash failed");
42+ known_host = hash_hosts ? hashed : hostport;
43 if (!get_cert)
44- fprintf(stdout, "%s ", hostport);
45+ fprintf(stdout, "%s ", known_host);
46 sshkey_write(key, stdout);
47 fputs("\n", stdout);
48 free(hostport);