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

Diff for /src/usr.bin/ssh/auth2-hostbased.c between version 1.52 and 1.53

version 1.52, 2023/03/05 05:34:09 version 1.53, 2024/05/17 00:30:23
Line 53 
Line 53 
   
 /* import */  /* import */
 extern ServerOptions options;  extern ServerOptions options;
   extern struct authmethod_cfg methodcfg_hostbased;
   
 static int  static int
 userauth_hostbased(struct ssh *ssh, const char *method)  userauth_hostbased(struct ssh *ssh, const char *method)
Line 144 
Line 145 
   
         /* test for allowed key and correct signature */          /* test for allowed key and correct signature */
         authenticated = 0;          authenticated = 0;
         if (PRIVSEP(hostbased_key_allowed(ssh, authctxt->pw, cuser,          if (mm_hostbased_key_allowed(ssh, authctxt->pw, cuser,
             chost, key)) &&              chost, key) &&
             PRIVSEP(sshkey_verify(key, sig, slen,              mm_sshkey_verify(key, sig, slen,
             sshbuf_ptr(b), sshbuf_len(b), pkalg, ssh->compat, NULL)) == 0)              sshbuf_ptr(b), sshbuf_len(b), pkalg, ssh->compat, NULL) == 0)
                 authenticated = 1;                  authenticated = 1;
   
         auth2_record_key(authctxt, authenticated, key);          auth2_record_key(authctxt, authenticated, key);
Line 251 
Line 252 
 }  }
   
 Authmethod method_hostbased = {  Authmethod method_hostbased = {
         "hostbased",          &methodcfg_hostbased,
         NULL,  
         userauth_hostbased,          userauth_hostbased,
         &options.hostbased_authentication  
 };  };

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