mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 07:44:29 +02:00
- djm@cvs.openbsd.org 2008/01/19 22:37:19
[ssh-keygen.c] unbreak line numbering (broken in revision 1.164), fix error message
This commit is contained in:
parent
a8796f3fcc
commit
cb2fbb2407
@ -29,6 +29,9 @@
|
|||||||
hash just the specified hostname and not the entire hostspec from the
|
hash just the specified hostname and not the entire hostspec from the
|
||||||
keyfile. It may be of the form "hostname,ipaddr", which would lead to
|
keyfile. It may be of the form "hostname,ipaddr", which would lead to
|
||||||
a hash that never matches. report and fix from jp AT devnull.cz
|
a hash that never matches. report and fix from jp AT devnull.cz
|
||||||
|
- djm@cvs.openbsd.org 2008/01/19 22:37:19
|
||||||
|
[ssh-keygen.c]
|
||||||
|
unbreak line numbering (broken in revision 1.164), fix error message
|
||||||
|
|
||||||
20080119
|
20080119
|
||||||
- (djm) Silence noice from expr in ssh-copy-id; patch from
|
- (djm) Silence noice from expr in ssh-copy-id; patch from
|
||||||
@ -3557,4 +3560,4 @@
|
|||||||
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
||||||
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.4825 2008/02/10 11:24:30 djm Exp $
|
$Id: ChangeLog,v 1.4826 2008/02/10 11:24:55 djm Exp $
|
||||||
|
13
ssh-keygen.c
13
ssh-keygen.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ssh-keygen.c,v 1.164 2008/01/19 22:22:58 djm Exp $ */
|
/* $OpenBSD: ssh-keygen.c,v 1.165 2008/01/19 22:37:19 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -504,7 +504,7 @@ do_fingerprint(struct passwd *pw)
|
|||||||
FILE *f;
|
FILE *f;
|
||||||
Key *public;
|
Key *public;
|
||||||
char *comment = NULL, *cp, *ep, line[16*1024], *fp;
|
char *comment = NULL, *cp, *ep, line[16*1024], *fp;
|
||||||
int i, skip = 0, num = 1, invalid = 1;
|
int i, skip = 0, num = 0, invalid = 1;
|
||||||
enum fp_rep rep;
|
enum fp_rep rep;
|
||||||
enum fp_type fptype;
|
enum fp_type fptype;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
@ -536,7 +536,8 @@ do_fingerprint(struct passwd *pw)
|
|||||||
if (f != NULL) {
|
if (f != NULL) {
|
||||||
while (fgets(line, sizeof(line), f)) {
|
while (fgets(line, sizeof(line), f)) {
|
||||||
if ((cp = strchr(line, '\n')) == NULL) {
|
if ((cp = strchr(line, '\n')) == NULL) {
|
||||||
error("line %d too long: %.40s...", num, line);
|
error("line %d too long: %.40s...",
|
||||||
|
num + 1, line);
|
||||||
skip = 1;
|
skip = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -613,7 +614,7 @@ do_known_hosts(struct passwd *pw, const char *name)
|
|||||||
Key *public;
|
Key *public;
|
||||||
char *cp, *cp2, *kp, *kp2;
|
char *cp, *cp2, *kp, *kp2;
|
||||||
char line[16*1024], tmp[MAXPATHLEN], old[MAXPATHLEN];
|
char line[16*1024], tmp[MAXPATHLEN], old[MAXPATHLEN];
|
||||||
int c, skip = 0, inplace = 0, num = 1, invalid = 0, has_unhashed = 0;
|
int c, skip = 0, inplace = 0, num = 0, invalid = 0, has_unhashed = 0;
|
||||||
|
|
||||||
if (!have_identity) {
|
if (!have_identity) {
|
||||||
cp = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE, pw->pw_uid);
|
cp = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE, pw->pw_uid);
|
||||||
@ -649,7 +650,7 @@ do_known_hosts(struct passwd *pw, const char *name)
|
|||||||
|
|
||||||
while (fgets(line, sizeof(line), in)) {
|
while (fgets(line, sizeof(line), in)) {
|
||||||
if ((cp = strchr(line, '\n')) == NULL) {
|
if ((cp = strchr(line, '\n')) == NULL) {
|
||||||
error("line %d too long: %.40s...", num, line);
|
error("line %d too long: %.40s...", num + 1, line);
|
||||||
skip = 1;
|
skip = 1;
|
||||||
invalid = 1;
|
invalid = 1;
|
||||||
continue;
|
continue;
|
||||||
@ -748,7 +749,7 @@ do_known_hosts(struct passwd *pw, const char *name)
|
|||||||
fclose(in);
|
fclose(in);
|
||||||
|
|
||||||
if (invalid) {
|
if (invalid) {
|
||||||
fprintf(stderr, "%s is not a valid known_host file.\n",
|
fprintf(stderr, "%s is not a valid known_hosts file.\n",
|
||||||
identity_file);
|
identity_file);
|
||||||
if (inplace) {
|
if (inplace) {
|
||||||
fprintf(stderr, "Not replacing existing known_hosts "
|
fprintf(stderr, "Not replacing existing known_hosts "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user