Bug 99 - auth2.c modifications for correct UNICOS behavior
Summary: auth2.c modifications for correct UNICOS behavior
Status: CLOSED INVALID
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: -current
Hardware: Other Other
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-05 06:18 AEDT by wendy palm
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wendy palm 2002-02-05 06:18:30 AEDT
--- auth2.c.orig        Mon Feb  4 12:32:51 2002
+++ auth2.c     Mon Feb  4 12:38:44 2002
@@ -51,12 +51,20 @@
 #include "hostfile.h"
 #include "canohost.h"
 #include "match.h"
+#ifdef _CRAY
+#include <ia.h>
+#endif /* _CRAY */

 /* import */
 extern ServerOptions options;
 extern u_char *session_id2;
 extern int session_id2_len;

+#ifdef _CRAY
+extern void cray_login_failure(char *username, int errcode);
+extern int  cray_access_denied(char *username);
+#endif /* _CRAY */
+
 static Authctxt        *x_authctxt = NULL;
 static int one = 1;

@@ -245,6 +253,13 @@
                authenticated = 0;
 #endif /* USE_PAM */

+#ifdef _CRAY
+       if (authenticated && cray_access_denied(authctxt->user)) {
+               authenticated = 0;
+               fatal("Access denied for user %s.",authctxt->user);
+       }
+#endif /* _CRAY */
+
        /* Log before sending the reply */
        auth_log(authctxt, authenticated, method, " ssh2");

@@ -269,6 +284,10 @@
 #endif /* WITH_AIXAUTHENTICATE */
                        packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
                }
+#ifdef _CRAY
+               if (strcmp(method, "password") == 0)
+                       cray_login_failure(authctxt->user, IA_UDBERR);
+#endif /* _CRAY */
                methods = authmethods_get();
                packet_start(SSH2_MSG_USERAUTH_FAILURE);
                packet_put_cstring(methods);
Comment 1 wendy palm 2002-04-23 08:31:41 AEST
updated for 22 april snapshot:
--- auth2.c.orig        Mon Apr 22 14:29:54 2002
+++ auth2.c     Mon Apr 22 14:31:19 2002
@@ -52,6 +52,10 @@
 #include "match.h"
 #include "monitor_wrap.h"
 
+#ifdef _CRAY
+#include <ia.h>
+#endif /* _CRAY */
+
 /* import */
 extern ServerOptions options;
 extern u_char *session_id2;
@@ -247,6 +251,13 @@
                authenticated = 0;
 #endif /* USE_PAM */
 
+#ifdef _CRAY
+       if (authenticated && cray_access_denied(authctxt->user)) {
+               authenticated = 0;
+               fatal("Access denied for user %s.",authctxt->user);
+       }
+#endif /* _CRAY */
+
        /* Log before sending the reply */
        auth_log(authctxt, authenticated, method, " ssh2");
 
@@ -271,6 +282,10 @@
 #endif /* WITH_AIXAUTHENTICATE */
                        packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
                }
+#ifdef _CRAY
+               if (strcmp(method, "password") == 0)
+                       cray_login_failure(authctxt->user, IA_UDBERR);
+#endif /* _CRAY */
                methods = authmethods_get();
                packet_start(SSH2_MSG_USERAUTH_FAILURE);
                packet_put_cstring(methods);
Comment 2 wendy palm 2002-07-23 08:45:44 AEST
superceeded by bug 367.
Comment 3 Damien Miller 2004-04-14 12:24:17 AEST
Mass change of RESOLVED bugs to CLOSED