[BACK]Return to ssh-keygen.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh-keygen.c between version 1.164 and 1.165

version 1.164, 2008/01/19 22:22:58 version 1.165, 2008/01/19 22:37:19
Line 497 
Line 497 
         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;
Line 529 
Line 529 
         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;
                         }                          }
Line 606 
Line 607 
         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);
Line 642 
Line 643 
   
         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;
Line 741 
Line 742 
         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 "

Legend:
Removed from v.1.164  
changed lines
  Added in v.1.165