- 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
This commit is contained in:
Damien Miller 2008-02-10 22:24:30 +11:00
parent 6b0c818568
commit a8796f3fcc
2 changed files with 11 additions and 4 deletions

View File

@ -23,6 +23,12 @@
[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
@ -3551,4 +3557,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
$Id: ChangeLog,v 1.4824 2008/02/10 11:23:41 djm Exp $
$Id: ChangeLog,v 1.4825 2008/02/10 11:24:30 djm Exp $

View 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);