[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.51 and 1.52

version 1.51, 2015/05/21 06:43:30 version 1.52, 2015/06/15 18:42:19
Line 621 
Line 621 
  * returns 1 if the principal is allowed or 0 otherwise.   * returns 1 if the principal is allowed or 0 otherwise.
  */   */
 static int  static int
 match_principals_command(struct passwd *user_pw, struct sshkey *key)  match_principals_command(struct passwd *user_pw, struct sshkey_cert *cert)
 {  {
         FILE *f = NULL;          FILE *f = NULL;
         int ok, found_principal = 0;          int ok, found_principal = 0;
Line 686 
Line 686 
         uid_swapped = 1;          uid_swapped = 1;
         temporarily_use_uid(pw);          temporarily_use_uid(pw);
   
         ok = process_principals(f, NULL, pw, key->cert);          ok = process_principals(f, NULL, pw, cert);
   
         if (exited_cleanly(pid, "AuthorizedPrincipalsCommand", command) != 0)          if (exited_cleanly(pid, "AuthorizedPrincipalsCommand", command) != 0)
                 goto out;                  goto out;
Line 854 
Line 854 
                         found_principal = 1;                          found_principal = 1;
         }          }
         /* Try querying command if specified */          /* Try querying command if specified */
         if (!found_principal && match_principals_command(pw, key))          if (!found_principal && match_principals_command(pw, key->cert))
                 found_principal = 1;                  found_principal = 1;
         /* If principals file or command specify, then require a match here */          /* If principals file or command specify, then require a match here */
         if (!found_principal && (principals_file != NULL ||          if (!found_principal && (principals_file != NULL ||

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52