summaryrefslogtreecommitdiff
path: root/hostfile.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2015-08-19 17:00:17 +0100
committerColin Watson <cjwatson@debian.org>2015-08-19 17:40:32 +0100
commit927d0032b865f05679d3cc052bc13cb0e6490283 (patch)
tree69f782deb79182f26069ff41e9539f17e6e44912 /hostfile.c
parentd35c65e77ab6a6a95fefa2c852827ba08e507f0b (diff)
parent810eecd6b2e03770f21e46b5cb8ce8c7fcd46da8 (diff)
New upstream release (6.9p1).
Diffstat (limited to 'hostfile.c')
-rw-r--r--hostfile.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hostfile.c b/hostfile.c
index b235795e6..2850a4793 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: hostfile.c,v 1.64 2015/02/16 22:08:57 djm Exp $ */ 1/* $OpenBSD: hostfile.c,v 1.66 2015/05/04 06:10:48 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -242,7 +242,8 @@ record_hostkey(struct hostkey_foreach_line *l, void *_ctx)
242 struct hostkey_entry *tmp; 242 struct hostkey_entry *tmp;
243 243
244 if (l->status == HKF_STATUS_INVALID) { 244 if (l->status == HKF_STATUS_INVALID) {
245 error("%s:%ld: parse error in hostkeys file", 245 /* XXX make this verbose() in the future */
246 debug("%s:%ld: parse error in hostkeys file",
246 l->path, l->linenum); 247 l->path, l->linenum);
247 return 0; 248 return 0;
248 } 249 }
@@ -662,7 +663,7 @@ match_maybe_hashed(const char *host, const char *names, int *was_hashed)
662 return nlen == strlen(hashed_host) && 663 return nlen == strlen(hashed_host) &&
663 strncmp(hashed_host, names, nlen) == 0; 664 strncmp(hashed_host, names, nlen) == 0;
664 } 665 }
665 return match_hostname(host, names, nlen) == 1; 666 return match_hostname(host, names) == 1;
666} 667}
667 668
668int 669int
@@ -810,7 +811,7 @@ hostkeys_foreach(const char *path, hostkeys_foreach_fn *callback, void *ctx,
810 memcpy(ktype, lineinfo.rawkey, l); 811 memcpy(ktype, lineinfo.rawkey, l);
811 ktype[l] = '\0'; 812 ktype[l] = '\0';
812 lineinfo.keytype = sshkey_type_from_name(ktype); 813 lineinfo.keytype = sshkey_type_from_name(ktype);
813#ifdef WITH_SSH1 814
814 /* 815 /*
815 * Assume RSA1 if the first component is a short 816 * Assume RSA1 if the first component is a short
816 * decimal number. 817 * decimal number.
@@ -818,7 +819,7 @@ hostkeys_foreach(const char *path, hostkeys_foreach_fn *callback, void *ctx,
818 if (lineinfo.keytype == KEY_UNSPEC && l < 8 && 819 if (lineinfo.keytype == KEY_UNSPEC && l < 8 &&
819 strspn(ktype, "0123456789") == l) 820 strspn(ktype, "0123456789") == l)
820 lineinfo.keytype = KEY_RSA1; 821 lineinfo.keytype = KEY_RSA1;
821#endif 822
822 /* 823 /*
823 * Check that something other than whitespace follows 824 * Check that something other than whitespace follows
824 * the key type. This won't catch all corruption, but 825 * the key type. This won't catch all corruption, but