]> andersk Git - openssh.git/blobdiff - auth2.c
- provos@cvs.openbsd.org 2002/03/18 01:12:14
[openssh.git] / auth2.c
diff --git a/auth2.c b/auth2.c
index 08f7191862fd38f9cfa6c400d5b843aa47cef9d5..b57fda216de8068b4f7b970f407fdb43c3e9b5bd 100644 (file)
--- 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 <openssl/evp.h>
 
@@ -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);
 }
-
This page took 0.515238 seconds and 4 git commands to generate.