]> andersk Git - openssh.git/commitdiff
- djm@cvs.openbsd.org 2008/01/19 22:22:58
authordjm <djm>
Sun, 10 Feb 2008 11:24:30 +0000 (11:24 +0000)
committerdjm <djm>
Sun, 10 Feb 2008 11:24:30 +0000 (11:24 +0000)
     [ssh-keygen.c]
     when hashing individual hosts (ssh-keygen -Hf hostname), make sure we
     hash just the specified hostname and not the entire hostspec from the
     keyfile. It may be of the form "hostname,ipaddr", which would lead to
     a hash that never matches. report and fix from jp AT devnull.cz

ChangeLog
ssh-keygen.c

index 9eae86facb13283f0ec9647d6f26271c6939d90c..d2e3ef4b5c19b165e5e9824df44286cbff721f97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      [sftp-client.c]
      fix remote handle leak in do_download() local file open error path;
      report and fix from sworley AT chkno.net
+   - djm@cvs.openbsd.org 2008/01/19 22:22:58
+     [ssh-keygen.c]
+     when hashing individual hosts (ssh-keygen -Hf hostname), make sure we
+     hash just the specified hostname and not the entire hostspec from the
+     keyfile. It may be of the form "hostname,ipaddr", which would lead to
+     a hash that never matches. report and fix from jp AT devnull.cz
 
 20080119
  - (djm) Silence noice from expr in ssh-copy-id; patch from
index 657937629b1d7ab87842a508248884d9b7e0bb75..6a2c520177ef851c01a07415f1518b133fefa377 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.163 2007/10/02 17:49:58 chl Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.164 2008/01/19 22:22:58 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -596,7 +596,7 @@ do_fingerprint(struct passwd *pw)
 }
 
 static void
-print_host(FILE *f, char *name, Key *public, int hash)
+print_host(FILE *f, const char *name, Key *public, int hash)
 {
        if (hash && (name = host_hash(name, NULL, 0)) == NULL)
                fatal("hash_host failed");
@@ -723,7 +723,8 @@ do_known_hosts(struct passwd *pw, const char *name)
                                        printf("# Host %s found: "
                                            "line %d type %s\n", name,
                                            num, key_type(public));
-                                       print_host(out, cp, public, hash_hosts);
+                                       print_host(out, name, public,
+                                           hash_hosts);
                                }
                                if (delete_host && !c)
                                        print_host(out, cp, public, 0);
This page took 0.045124 seconds and 5 git commands to generate.