summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 9aac64fc3..fdd236bda 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.314 2018/03/12 00:52:01 djm Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.315 2018/06/01 03:51:34 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1254,13 +1254,12 @@ do_known_hosts(struct passwd *pw, const char *name)
1254 } 1254 }
1255 inplace = 1; 1255 inplace = 1;
1256 } 1256 }
1257
1258 /* XXX support identity_file == "-" for stdin */ 1257 /* XXX support identity_file == "-" for stdin */
1259 foreach_options = find_host ? HKF_WANT_MATCH : 0; 1258 foreach_options = find_host ? HKF_WANT_MATCH : 0;
1260 foreach_options |= print_fingerprint ? HKF_WANT_PARSE_KEY : 0; 1259 foreach_options |= print_fingerprint ? HKF_WANT_PARSE_KEY : 0;
1261 if ((r = hostkeys_foreach(identity_file, 1260 if ((r = hostkeys_foreach(identity_file, (find_host || !hash_hosts) ?
1262 hash_hosts ? known_hosts_hash : known_hosts_find_delete, &ctx, 1261 known_hosts_find_delete : known_hosts_hash, &ctx, name, NULL,
1263 name, NULL, foreach_options)) != 0) { 1262 foreach_options)) != 0) {
1264 if (inplace) 1263 if (inplace)
1265 unlink(tmp); 1264 unlink(tmp);
1266 fatal("%s: hostkeys_foreach failed: %s", __func__, ssh_err(r)); 1265 fatal("%s: hostkeys_foreach failed: %s", __func__, ssh_err(r));