- djm@cvs.openbsd.org 2005/03/02 01:27:41

[ssh-keygen.c]
     ignore hostnames with metachars when hashing; ok deraadt@
This commit is contained in:
Damien Miller 2005-03-02 12:33:04 +11:00
parent 1227d4c93c
commit 89eac8010a
2 changed files with 14 additions and 4 deletions

View File

@ -39,6 +39,9 @@
[sshconnect.c] [sshconnect.c]
fix addition of new hashed hostnames when CheckHostIP=yes; fix addition of new hashed hostnames when CheckHostIP=yes;
found and ok dtucker@ found and ok dtucker@
- djm@cvs.openbsd.org 2005/03/02 01:27:41
[ssh-keygen.c]
ignore hostnames with metachars when hashing; ok deraadt@
20050301 20050301
- (djm) OpenBSD CVS sync: - (djm) OpenBSD CVS sync:
@ -2258,4 +2261,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.3685 2005/03/02 01:06:51 djm Exp $ $Id: ChangeLog,v 1.3686 2005/03/02 01:33:04 djm Exp $

View File

@ -12,7 +12,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$OpenBSD: ssh-keygen.c,v 1.119 2005/03/01 10:42:49 djm Exp $"); RCSID("$OpenBSD: ssh-keygen.c,v 1.120 2005/03/02 01:27:41 djm Exp $");
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/pem.h> #include <openssl/pem.h>
@ -686,8 +686,15 @@ do_known_hosts(struct passwd *pw, const char *name)
} else if (hash_hosts) { } else if (hash_hosts) {
for(cp2 = strsep(&cp, ","); for(cp2 = strsep(&cp, ",");
cp2 != NULL && *cp2 != '\0'; cp2 != NULL && *cp2 != '\0';
cp2 = strsep(&cp, ",")) cp2 = strsep(&cp, ",")) {
print_host(out, cp2, public, 1); if (strcspn(cp2, "*?!") != strlen(cp2))
fprintf(stderr, "Warning: "
"ignoring host name with "
"metacharacters: %.64s\n",
cp2);
else
print_host(out, cp2, public, 1);
}
has_unhashed = 1; has_unhashed = 1;
} }
} }