[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.109 and 1.110

version 1.109, 2021/07/23 03:37:52 version 1.110, 2021/09/29 01:33:32
Line 373 
Line 373 
 {  {
         char loc[256], *line = NULL, *cp, *ep;          char loc[256], *line = NULL, *cp, *ep;
         size_t linesize = 0;          size_t linesize = 0;
         u_long linenum = 0;          u_long linenum = 0, nonblank = 0;
         u_int found_principal = 0;          u_int found_principal = 0;
   
         if (authoptsp != NULL)          if (authoptsp != NULL)
Line 394 
Line 394 
                 if (!*cp || *cp == '\n')                  if (!*cp || *cp == '\n')
                         continue;                          continue;
   
                   nonblank++;
                 snprintf(loc, sizeof(loc), "%.200s:%lu", file, linenum);                  snprintf(loc, sizeof(loc), "%.200s:%lu", file, linenum);
                 if (check_principals_line(ssh, cp, cert, loc, authoptsp) == 0)                  if (check_principals_line(ssh, cp, cert, loc, authoptsp) == 0)
                         found_principal = 1;                          found_principal = 1;
         }          }
           debug2_f("%s: processed %lu/%lu lines", file, nonblank, linenum);
         free(line);          free(line);
         return found_principal;          return found_principal;
 }  }
Line 716 
Line 718 
         char *cp, *line = NULL, loc[256];          char *cp, *line = NULL, loc[256];
         size_t linesize = 0;          size_t linesize = 0;
         int found_key = 0;          int found_key = 0;
         u_long linenum = 0;          u_long linenum = 0, nonblank = 0;
   
         if (authoptsp != NULL)          if (authoptsp != NULL)
                 *authoptsp = NULL;                  *authoptsp = NULL;
Line 732 
Line 734 
                 skip_space(&cp);                  skip_space(&cp);
                 if (!*cp || *cp == '\n' || *cp == '#')                  if (!*cp || *cp == '\n' || *cp == '#')
                         continue;                          continue;
   
                   nonblank++;
                 snprintf(loc, sizeof(loc), "%.200s:%lu", file, linenum);                  snprintf(loc, sizeof(loc), "%.200s:%lu", file, linenum);
                 if (check_authkey_line(ssh, pw, key, cp, loc, authoptsp) == 0)                  if (check_authkey_line(ssh, pw, key, cp, loc, authoptsp) == 0)
                         found_key = 1;                          found_key = 1;
         }          }
         free(line);          free(line);
           debug2_f("%s: processed %lu/%lu lines", file, nonblank, linenum);
         return found_key;          return found_key;
 }  }
   

Legend:
Removed from v.1.109  
changed lines
  Added in v.1.110