[openssh-commits] [openssh] 03/05: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Apr 13 14:37:28 AEST 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 2c2cfe1a1c97eb9a08cc9817fd0678209680c636
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Apr 10 00:08:55 2015 +0000

    upstream commit
    
    include port number if a non-default one has been
     specified; based on patch from Michael Handler
---
 ssh-keyscan.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 61b4ca5..57d8842 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.100 2015/04/05 15:43:43 miod Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.101 2015/04/10 00:08:55 djm Exp $ */
 /*
  * Copyright 1995, 1996 by David Mazieres <dm at lcs.mit.edu>.
  *
@@ -299,15 +299,18 @@ static void
 keyprint(con *c, struct sshkey *key)
 {
 	char *host = c->c_output_name ? c->c_output_name : c->c_name;
+	char *hostport = NULL;
 
 	if (!key)
 		return;
 	if (hash_hosts && (host = host_hash(host, NULL, 0)) == NULL)
 		fatal("host_hash failed");
 
-	fprintf(stdout, "%s ", host);
+	hostport = put_host_port(host, ssh_port);
+	fprintf(stdout, "%s ", hostport);
 	sshkey_write(key, stdout);
 	fputs("\n", stdout);
+	free(hostport);
 }
 
 static int
@@ -488,7 +491,7 @@ congreet(int s)
 		confree(s);
 		return;
 	}
-	fprintf(stderr, "# %s %s\n", c->c_name, chop(buf));
+	fprintf(stderr, "# %s:%d %s\n", c->c_name, ssh_port, chop(buf));
 	n = snprintf(buf, sizeof buf, "SSH-%d.%d-OpenSSH-keyscan\r\n",
 	    c->c_keytype == KT_RSA1? PROTOCOL_MAJOR_1 : PROTOCOL_MAJOR_2,
 	    c->c_keytype == KT_RSA1? PROTOCOL_MINOR_1 : PROTOCOL_MINOR_2);

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list