summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ssh-keygen.c13
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d96f47a11..066349f4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,9 @@
29 hash just the specified hostname and not the entire hostspec from the 29 hash just the specified hostname and not the entire hostspec from the
30 keyfile. It may be of the form "hostname,ipaddr", which would lead to 30 keyfile. It may be of the form "hostname,ipaddr", which would lead to
31 a hash that never matches. report and fix from jp AT devnull.cz 31 a hash that never matches. report and fix from jp AT devnull.cz
32 - djm@cvs.openbsd.org 2008/01/19 22:37:19
33 [ssh-keygen.c]
34 unbreak line numbering (broken in revision 1.164), fix error message
32 35
3320080119 3620080119
34 - (djm) Silence noice from expr in ssh-copy-id; patch from 37 - (djm) Silence noice from expr in ssh-copy-id; patch from
@@ -3557,4 +3560,4 @@
3557 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3560 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3558 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3561 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3559 3562
3560$Id: ChangeLog,v 1.4825 2008/02/10 11:24:30 djm Exp $ 3563$Id: ChangeLog,v 1.4826 2008/02/10 11:24:55 djm Exp $
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 6a2c52017..adacbff0b 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.164 2008/01/19 22:22:58 djm Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.165 2008/01/19 22:37:19 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
@@ -504,7 +504,7 @@ do_fingerprint(struct passwd *pw)
504 FILE *f; 504 FILE *f;
505 Key *public; 505 Key *public;
506 char *comment = NULL, *cp, *ep, line[16*1024], *fp; 506 char *comment = NULL, *cp, *ep, line[16*1024], *fp;
507 int i, skip = 0, num = 1, invalid = 1; 507 int i, skip = 0, num = 0, invalid = 1;
508 enum fp_rep rep; 508 enum fp_rep rep;
509 enum fp_type fptype; 509 enum fp_type fptype;
510 struct stat st; 510 struct stat st;
@@ -536,7 +536,8 @@ do_fingerprint(struct passwd *pw)
536 if (f != NULL) { 536 if (f != NULL) {
537 while (fgets(line, sizeof(line), f)) { 537 while (fgets(line, sizeof(line), f)) {
538 if ((cp = strchr(line, '\n')) == NULL) { 538 if ((cp = strchr(line, '\n')) == NULL) {
539 error("line %d too long: %.40s...", num, line); 539 error("line %d too long: %.40s...",
540 num + 1, line);
540 skip = 1; 541 skip = 1;
541 continue; 542 continue;
542 } 543 }
@@ -613,7 +614,7 @@ do_known_hosts(struct passwd *pw, const char *name)
613 Key *public; 614 Key *public;
614 char *cp, *cp2, *kp, *kp2; 615 char *cp, *cp2, *kp, *kp2;
615 char line[16*1024], tmp[MAXPATHLEN], old[MAXPATHLEN]; 616 char line[16*1024], tmp[MAXPATHLEN], old[MAXPATHLEN];
616 int c, skip = 0, inplace = 0, num = 1, invalid = 0, has_unhashed = 0; 617 int c, skip = 0, inplace = 0, num = 0, invalid = 0, has_unhashed = 0;
617 618
618 if (!have_identity) { 619 if (!have_identity) {
619 cp = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE, pw->pw_uid); 620 cp = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE, pw->pw_uid);
@@ -649,7 +650,7 @@ do_known_hosts(struct passwd *pw, const char *name)
649 650
650 while (fgets(line, sizeof(line), in)) { 651 while (fgets(line, sizeof(line), in)) {
651 if ((cp = strchr(line, '\n')) == NULL) { 652 if ((cp = strchr(line, '\n')) == NULL) {
652 error("line %d too long: %.40s...", num, line); 653 error("line %d too long: %.40s...", num + 1, line);
653 skip = 1; 654 skip = 1;
654 invalid = 1; 655 invalid = 1;
655 continue; 656 continue;
@@ -748,7 +749,7 @@ do_known_hosts(struct passwd *pw, const char *name)
748 fclose(in); 749 fclose(in);
749 750
750 if (invalid) { 751 if (invalid) {
751 fprintf(stderr, "%s is not a valid known_host file.\n", 752 fprintf(stderr, "%s is not a valid known_hosts file.\n",
752 identity_file); 753 identity_file);
753 if (inplace) { 754 if (inplace) {
754 fprintf(stderr, "Not replacing existing known_hosts " 755 fprintf(stderr, "Not replacing existing known_hosts "