version 1.47.2.1, 2003/09/16 20:50:42 |
version 1.47.2.2, 2004/03/04 18:18:15 |
|
|
u_int dlen; |
u_int dlen; |
u_int ulen; |
u_int ulen; |
int type = 0; |
int type = 0; |
struct passwd *pw = authctxt->pw; |
|
|
|
debug("Attempting authentication for %s%.100s.", |
debug("Attempting authentication for %s%.100s.", |
authctxt->valid ? "" : "illegal user ", authctxt->user); |
authctxt->valid ? "" : "illegal user ", authctxt->user); |
|
|
BN_num_bits(client_host_key->rsa->n), bits); |
BN_num_bits(client_host_key->rsa->n), bits); |
packet_check_eom(); |
packet_check_eom(); |
|
|
authenticated = auth_rhosts_rsa(pw, client_user, |
authenticated = auth_rhosts_rsa(authctxt, client_user, |
client_host_key); |
client_host_key); |
key_free(client_host_key); |
key_free(client_host_key); |
|
|
|
|
fatal("do_authloop: BN_new failed"); |
fatal("do_authloop: BN_new failed"); |
packet_get_bignum(n); |
packet_get_bignum(n); |
packet_check_eom(); |
packet_check_eom(); |
authenticated = auth_rsa(pw, n); |
authenticated = auth_rsa(authctxt, n); |
BN_clear_free(n); |
BN_clear_free(n); |
break; |
break; |
|
|
|
|
* Performs authentication of an incoming connection. Session key has already |
* Performs authentication of an incoming connection. Session key has already |
* been exchanged and encryption is enabled. |
* been exchanged and encryption is enabled. |
*/ |
*/ |
Authctxt * |
void |
do_authentication(void) |
do_authentication(Authctxt *authctxt) |
{ |
{ |
Authctxt *authctxt; |
|
u_int ulen; |
u_int ulen; |
char *user, *style = NULL; |
char *user, *style = NULL; |
|
|
|
|
if ((style = strchr(user, ':')) != NULL) |
if ((style = strchr(user, ':')) != NULL) |
*style++ = '\0'; |
*style++ = '\0'; |
|
|
authctxt = authctxt_new(); |
|
authctxt->user = user; |
authctxt->user = user; |
authctxt->style = style; |
authctxt->style = style; |
|
|
|
|
packet_start(SSH_SMSG_SUCCESS); |
packet_start(SSH_SMSG_SUCCESS); |
packet_send(); |
packet_send(); |
packet_write_wait(); |
packet_write_wait(); |
|
|
return (authctxt); |
|
} |
} |