diff options
author | Darren Tucker <dtucker@zip.com.au> | 2012-09-06 21:20:39 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2012-09-06 21:20:39 +1000 |
commit | f09a8a6c6d8c06b9b855cf902e2a7129932a25e0 (patch) | |
tree | 77fa6e6b2a96c025a2fabc6f71374278b8c6df87 | |
parent | ae608bdd83c8bc37ef701aba9603a4f69d473b2d (diff) |
- djm@cvs.openbsd.org 2012/08/17 01:25:58
[ssh-keygen.c]
print details of which host lines were deleted when using
"ssh-keygen -R host"; ok markus@
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ssh-keygen.c | 22 |
2 files changed, 21 insertions, 5 deletions
@@ -13,6 +13,10 @@ | |||
13 | [kex.c] | 13 | [kex.c] |
14 | add some comments about better handling first-KEX-follows notifications | 14 | add some comments about better handling first-KEX-follows notifications |
15 | from the server. Nothing uses these right now. No binary change | 15 | from the server. Nothing uses these right now. No binary change |
16 | - djm@cvs.openbsd.org 2012/08/17 01:25:58 | ||
17 | [ssh-keygen.c] | ||
18 | print details of which host lines were deleted when using | ||
19 | "ssh-keygen -R host"; ok markus@ | ||
16 | 20 | ||
17 | 20120830 | 21 | 20120830 |
18 | - (dtucker) [moduli] Import new moduli file. | 22 | - (dtucker) [moduli] Import new moduli file. |
diff --git a/ssh-keygen.c b/ssh-keygen.c index a223ddc81..5060276d7 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.216 2012/07/06 06:38:03 jmc Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.217 2012/08/17 01:25:58 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 |
@@ -1088,8 +1088,14 @@ do_known_hosts(struct passwd *pw, const char *name) | |||
1088 | ca ? " (CA key)" : ""); | 1088 | ca ? " (CA key)" : ""); |
1089 | printhost(out, cp, pub, ca, 0); | 1089 | printhost(out, cp, pub, ca, 0); |
1090 | } | 1090 | } |
1091 | if (delete_host && !c && !ca) | 1091 | if (delete_host) { |
1092 | printhost(out, cp, pub, ca, 0); | 1092 | if (!c && !ca) |
1093 | printhost(out, cp, pub, ca, 0); | ||
1094 | else | ||
1095 | printf("# Host %s found: " | ||
1096 | "line %d type %s\n", name, | ||
1097 | num, key_type(pub)); | ||
1098 | } | ||
1093 | } else if (hash_hosts) | 1099 | } else if (hash_hosts) |
1094 | printhost(out, cp, pub, ca, 0); | 1100 | printhost(out, cp, pub, ca, 0); |
1095 | } else { | 1101 | } else { |
@@ -1104,8 +1110,14 @@ do_known_hosts(struct passwd *pw, const char *name) | |||
1104 | printhost(out, name, pub, | 1110 | printhost(out, name, pub, |
1105 | ca, hash_hosts && !ca); | 1111 | ca, hash_hosts && !ca); |
1106 | } | 1112 | } |
1107 | if (delete_host && !c && !ca) | 1113 | if (delete_host) { |
1108 | printhost(out, cp, pub, ca, 0); | 1114 | if (!c && !ca) |
1115 | printhost(out, cp, pub, ca, 0); | ||
1116 | else | ||
1117 | printf("# Host %s found: " | ||
1118 | "line %d type %s\n", name, | ||
1119 | num, key_type(pub)); | ||
1120 | } | ||
1109 | } else if (hash_hosts) { | 1121 | } else if (hash_hosts) { |
1110 | for (cp2 = strsep(&cp, ","); | 1122 | for (cp2 = strsep(&cp, ","); |
1111 | cp2 != NULL && *cp2 != '\0'; | 1123 | cp2 != NULL && *cp2 != '\0'; |