[openssh-commits] [openssh] 08/09: upstream: Fix UpdateHostkeys/HashKnownHosts/CheckHostIP bug
git+noreply at mindrot.org
git+noreply at mindrot.org
Wed Oct 7 13:34:24 AEDT 2020
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 04c06d04475f1f673e9d9743710d194453fe3888
Author: djm at openbsd.org <djm at openbsd.org>
Date: Wed Oct 7 02:25:43 2020 +0000
upstream: Fix UpdateHostkeys/HashKnownHosts/CheckHostIP bug
When all of UpdateHostkeys, HashKnownHosts and ChechHostIP
were enabled and new host keys were learned, known_hosts IP
entries were not being recorded for new host keys.
reported by matthieu@ ok markus@
OpenBSD-Commit-ID: a654a8290bd1c930aac509e8158cf85e42e49cb7
---
hostfile.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hostfile.c b/hostfile.c
index 00462555..650ad66f 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hostfile.c,v 1.83 2020/10/04 09:45:01 djm Exp $ */
+/* $OpenBSD: hostfile.c,v 1.84 2020/10/07 02:25:43 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -451,6 +451,9 @@ write_host_entry(FILE *f, const char *host, const char *ip,
else
error("%s: sshkey_write failed: %s", __func__, ssh_err(r));
fputc('\n', f);
+ /* If hashing is enabled, the IP address needs to go on its own line */
+ if (success && store_hash && ip != NULL)
+ success = write_host_entry(f, ip, NULL, key, 1);
return success;
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list