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

Diff for /src/usr.bin/ssh/auth2-pubkey.c between version 1.61 and 1.62

version 1.61, 2016/12/30 22:08:02 version 1.62, 2017/01/30 01:03:00
Line 561 
Line 561 
 {  {
         char line[SSH_MAX_PUBKEY_BYTES], *cp, *ep, *line_opts;          char line[SSH_MAX_PUBKEY_BYTES], *cp, *ep, *line_opts;
         u_long linenum = 0;          u_long linenum = 0;
         u_int i;          u_int i, found_principal = 0;
   
         while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {          while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
                   /* Always consume entire input */
                   if (found_principal)
                           continue;
                 /* Skip leading whitespace. */                  /* Skip leading whitespace. */
                 for (cp = line; *cp == ' ' || *cp == '\t'; cp++)                  for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
                         ;                          ;
Line 596 
Line 599 
                                 if (auth_parse_options(pw, line_opts,                                  if (auth_parse_options(pw, line_opts,
                                     file, linenum) != 1)                                      file, linenum) != 1)
                                         continue;                                          continue;
                                 return 1;                                  found_principal = 1;
                                   continue;
                         }                          }
                 }                  }
         }          }
         return 0;          return found_principal;
 }  }
   
 static int  static int
Line 768 
Line 772 
                 char *cp, *key_options = NULL, *fp = NULL;                  char *cp, *key_options = NULL, *fp = NULL;
                 const char *reason = NULL;                  const char *reason = NULL;
   
                   /* Always consume entrire file */
                   if (found_key)
                           continue;
                 if (found != NULL)                  if (found != NULL)
                         key_free(found);                          key_free(found);
                 found = key_new(key_is_cert(key) ? KEY_UNSPEC : key->type);                  found = key_new(key_is_cert(key) ? KEY_UNSPEC : key->type);
Line 854 
Line 861 
                             file, linenum, key_type(found), fp);                              file, linenum, key_type(found), fp);
                         free(fp);                          free(fp);
                         found_key = 1;                          found_key = 1;
                         break;                          continue;
                 }                  }
         }          }
         if (found != NULL)          if (found != NULL)

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.62