]> andersk Git - openssh.git/blobdiff - auth2.c
- (djm) Add new UsePAM configuration directive to allow runtime control
[openssh.git] / auth2.c
diff --git a/auth2.c b/auth2.c
index a761ba5fa28396804eb75f4fc49d0b604345eed9..5ca020001ecc43a58b3faa1bdad7c7892523fbb4 100644 (file)
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.96 2003/02/06 21:22:43 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.98 2003/05/14 02:15:47 markus Exp $");
 
 #include "ssh2.h"
 #include "xmalloc.h"
@@ -50,6 +50,9 @@ extern Authmethod method_pubkey;
 extern Authmethod method_passwd;
 extern Authmethod method_kbdint;
 extern Authmethod method_hostbased;
+#ifdef KRB5
+extern Authmethod method_kerberos;
+#endif
 
 Authmethod *authmethods[] = {
        &method_none,
@@ -57,6 +60,9 @@ Authmethod *authmethods[] = {
        &method_passwd,
        &method_kbdint,
        &method_hostbased,
+#ifdef KRB5
+       &method_kerberos,
+#endif
        NULL
 };
 
@@ -85,10 +91,6 @@ do_authentication2(void)
        /* challenge-response is implemented via keyboard interactive */
        if (options.challenge_response_authentication)
                options.kbd_interactive_authentication = 1;
-       if (options.pam_authentication_via_kbd_int)
-               options.kbd_interactive_authentication = 1;
-       if (use_privsep)
-               options.pam_authentication_via_kbd_int = 0;
 
        dispatch_init(&dispatch_protocol_error);
        dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request);
@@ -157,12 +159,14 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
                        authctxt->valid = 1;
                        debug2("input_userauth_request: setting up authctxt for %s", user);
 #ifdef USE_PAM
-                       PRIVSEP(start_pam(authctxt->pw->pw_name));
+                       if (options.use_pam)
+                               PRIVSEP(start_pam(authctxt->pw->pw_name));
 #endif
                } else {
                        logit("input_userauth_request: illegal user %s", user);
 #ifdef USE_PAM
-                       PRIVSEP(start_pam(user));
+                       if (options.use_pam)
+                               PRIVSEP(start_pam(user));
 #endif
                }
                setproctitle("%s%s", authctxt->pw ? user : "unknown",
@@ -209,12 +213,6 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
            !auth_root_allowed(method))
                authenticated = 0;
 
-#ifdef USE_PAM
-       if (!use_privsep && authenticated && authctxt->user && 
-           !do_pam_account(authctxt->user, NULL))
-               authenticated = 0;
-#endif /* USE_PAM */
-
 #ifdef _UNICOS
        if (authenticated && cray_access_denied(authctxt->user)) {
                authenticated = 0;
This page took 0.057734 seconds and 4 git commands to generate.