X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/67fa09f5ac2e9e0facd492800cb2b5676d4ed2f7..1b34c1b358b2f6e4e4e9deb82cbd025122901318:/auth2.c diff --git a/auth2.c b/auth2.c index 08f71918..b57fda21 100644 --- a/auth2.c +++ b/auth2.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2.c,v 1.84 2002/02/04 11:58:10 markus Exp $"); +RCSID("$OpenBSD: auth2.c,v 1.87 2002/03/18 01:12:14 provos Exp $"); #include @@ -109,7 +109,7 @@ Authmethod authmethods[] = { * loop until authctxt->success == TRUE */ -void +Authctxt * do_authentication2(void) { Authctxt *authctxt = authctxt_new(); @@ -125,7 +125,8 @@ do_authentication2(void) dispatch_init(&dispatch_protocol_error); dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request); dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt); - do_authenticated(authctxt); + + return (authctxt); } static void @@ -184,8 +185,8 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt) if (authctxt->attempt++ == 0) { /* setup auth context */ struct passwd *pw = NULL; - pw = getpwnam(user); - if (pw && allowed_user(pw) && strcmp(service, "ssh-connection")==0) { + pw = getpwnamallow(user); + if (pw && strcmp(service, "ssh-connection")==0) { authctxt->pw = pwcopy(pw); authctxt->valid = 1; debug2("input_userauth_request: setting up authctxt for %s", user); @@ -264,7 +265,7 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method) if (authctxt->failures++ > AUTH_FAIL_MAX) { #ifdef WITH_AIXAUTHENTICATE loginfailed(authctxt->user, - get_canonical_hostname(options.reverse_mapping_check), + get_canonical_hostname(options.verify_reverse_mapping), "ssh"); #endif /* WITH_AIXAUTHENTICATE */ packet_disconnect(AUTH_FAIL_MSG, authctxt->user); @@ -398,7 +399,8 @@ userauth_pubkey(Authctxt *authctxt) { Buffer b; Key *key = NULL; - char *pkalg, *pkblob, *sig; + char *pkalg; + u_char *pkblob, *sig; u_int alen, blen, slen; int have_sig, pktype; int authenticated = 0; @@ -512,7 +514,8 @@ userauth_hostbased(Authctxt *authctxt) { Buffer b; Key *key = NULL; - char *pkalg, *pkblob, *sig, *cuser, *chost, *service; + char *pkalg, *cuser, *chost, *service; + u_char *pkblob, *sig; u_int alen, blen, slen; int pktype; int authenticated = 0; @@ -794,4 +797,3 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost, return (host_status == HOST_OK); } -