]> andersk Git - gssapi-openssh.git/blobdiff - openssh/auth1.c
Import of OpenSSH 3.8p1
[gssapi-openssh.git] / openssh / auth1.c
index dfe944dd1acd6c6e3822fbed63f0302cf4474511..82fe5fb80c2a642a680b83e20fff19b7528ed80a 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth1.c,v 1.52 2003/08/28 12:54:34 markus Exp $");
+RCSID("$OpenBSD: auth1.c,v 1.55 2003/11/08 16:02:40 jakob Exp $");
 
 #include "xmalloc.h"
 #include "rsa.h"
@@ -139,7 +139,7 @@ do_authloop(Authctxt *authctxt)
                                    BN_num_bits(client_host_key->rsa->n), bits);
                        packet_check_eom();
 
-                       authenticated = auth_rhosts_rsa(pw, client_user,
+                       authenticated = auth_rhosts_rsa(authctxt, client_user,
                            client_host_key);
                        key_free(client_host_key);
 
@@ -156,7 +156,7 @@ do_authloop(Authctxt *authctxt)
                                fatal("do_authloop: BN_new failed");
                        packet_get_bignum(n);
                        packet_check_eom();
-                       authenticated = auth_rsa(pw, n);
+                       authenticated = auth_rsa(authctxt, n);
                        BN_clear_free(n);
                        break;
 
@@ -235,7 +235,7 @@ do_authloop(Authctxt *authctxt)
                if (authenticated &&
                    !check_nt_auth(type == SSH_CMSG_AUTH_PASSWORD, pw)) {
                        packet_disconnect("Authentication rejected for uid %d.",
-                       pw == NULL ? -1 : pw->pw_uid);
+                           pw == NULL ? -1 : pw->pw_uid);
                        authenticated = 0;
                }
 #else
@@ -246,7 +246,7 @@ do_authloop(Authctxt *authctxt)
 #endif
 
 #ifdef USE_PAM
-               if (options.use_pam && authenticated && 
+               if (options.use_pam && authenticated &&
                    !PRIVSEP(do_pam_account()))
                        authenticated = 0;
 #endif
@@ -275,10 +275,9 @@ do_authloop(Authctxt *authctxt)
  * Performs authentication of an incoming connection.  Session key has already
  * been exchanged and encryption is enabled.
  */
-Authctxt *
-do_authentication(void)
+void
+do_authentication(Authctxt *authctxt)
 {
-       Authctxt *authctxt;
        u_int ulen;
        char *user, *style = NULL;
 
@@ -292,7 +291,6 @@ do_authentication(void)
        if ((style = strchr(user, ':')) != NULL)
                *style++ = '\0';
 
-       authctxt = authctxt_new();
        authctxt->user = user;
        authctxt->style = style;
 
@@ -332,6 +330,4 @@ do_authentication(void)
        packet_start(SSH_SMSG_SUCCESS);
        packet_send();
        packet_write_wait();
-
-       return (authctxt);
 }
This page took 0.393325 seconds and 4 git commands to generate.