]> andersk Git - gssapi-openssh.git/blobdiff - openssh/auth2.c
o Merge changes from OPENSSH_3_5P1_GSI_20021018.
[gssapi-openssh.git] / openssh / auth2.c
index 57742536686b512b23c6b08566b4cb96c4d957c8..4d793b51dc73c675c3f5e8fa5f525e0bf012a3fd 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.93 2002/05/31 11:35:15 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.95 2002/08/22 21:33:58 markus Exp $");
 
 #include "ssh2.h"
 #include "ssh1.h"
@@ -115,7 +115,7 @@ input_service_request(int type, u_int32_t seq, void *ctxt)
 {
        Authctxt *authctxt = ctxt;
        u_int len;
-       int accept = 0;
+       int acceptit = 0;
        char *service = packet_get_string(&len);
        packet_check_eom();
 
@@ -124,14 +124,14 @@ input_service_request(int type, u_int32_t seq, void *ctxt)
 
        if (strcmp(service, "ssh-userauth") == 0) {
                if (!authctxt->success) {
-                       accept = 1;
+                       acceptit = 1;
                        /* now we can handle user-auth requests */
                        dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &input_userauth_request);
                }
        }
        /* XXX all other service requests are denied */
 
-       if (accept) {
+       if (acceptit) {
                packet_start(SSH2_MSG_SERVICE_ACCEPT);
                packet_put_cstring(service);
                packet_send();
@@ -267,7 +267,8 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
                    authctxt->user);
 
        /* Special handling for root */
-       if (authenticated && authctxt->pw->pw_uid == 0 &&
+       if (!use_privsep &&
+           authenticated && authctxt->pw->pw_uid == 0 &&
            !auth_root_allowed(method))
                authenticated = 0;
 
@@ -277,6 +278,13 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
                authenticated = 0;
 #endif /* USE_PAM */
 
+#ifdef _UNICOS
+       if (authenticated && cray_access_denied(authctxt->user)) {
+               authenticated = 0;
+               fatal("Access denied for user %s.",authctxt->user);
+       }
+#endif /* _UNICOS */
+
        /* Log before sending the reply */
        if (!compat20)
        auth_log(authctxt, authenticated, method, " ssh1");
@@ -299,12 +307,6 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
                authctxt->success = 1;
        } else {
                if (authctxt->failures++ > AUTH_FAIL_MAX) {
-#ifdef WITH_AIXAUTHENTICATE
-                       /* XXX: privsep */
-                       loginfailed(authctxt->user,
-                           get_canonical_hostname(options.verify_reverse_mapping),
-                           "ssh");
-#endif /* WITH_AIXAUTHENTICATE */
                        packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
                }
                if (!compat20) {
@@ -317,6 +319,10 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
                */
                authctxt->success = authctxt->postponed = 1;
                } else {
+#ifdef _UNICOS
+               if (strcmp(method, "password") == 0)
+                       cray_login_failure(authctxt->user, IA_UDBERR);
+#endif /* _UNICOS */
                methods = authmethods_get();
                if (!compat20)
                packet_disconnect("GSSAPI authentication failed");
This page took 0.1572 seconds and 4 git commands to generate.