]> andersk Git - openssh.git/blobdiff - auth.c
- (tim) [contrib/cygwin/README] add minires-devel requirement. Patch from
[openssh.git] / auth.c
diff --git a/auth.c b/auth.c
index 4f93ce5ae963523997cf6d84a98c08ef78840166..d9ee0362fe4888af4b43e783fc56a1988d505438 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth.c,v 1.53 2004/05/11 19:01:43 deraadt Exp $");
+RCSID("$OpenBSD: auth.c,v 1.54 2004/05/23 23:59:53 dtucker Exp $");
 
 #ifdef HAVE_LOGIN_H
 #include <login.h>
@@ -203,31 +203,10 @@ allowed_user(struct passwd * pw)
                ga_free();
        }
 
-#ifdef WITH_AIXAUTHENTICATE
-       /*
-        * Don't check loginrestrictions() for root account (use
-        * PermitRootLogin to control logins via ssh), or if running as
-        * non-root user (since loginrestrictions will always fail).
-        */
-       if ((pw->pw_uid != 0) && (geteuid() == 0)) {
-               char *msg;
-
-               if (loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &msg) != 0) {
-                       int loginrestrict_errno = errno;
-
-                       if (msg && *msg) {
-                               buffer_append(&loginmsg, msg, strlen(msg));
-                               aix_remove_embedded_newlines(msg);
-                               logit("Login restricted for %s: %.100s",
-                                   pw->pw_name, msg);
-                       }
-                       /* Don't fail if /etc/nologin  set */
-                       if (!(loginrestrict_errno == EPERM &&
-                           stat(_PATH_NOLOGIN, &st) == 0))
-                               return 0;
-               }
-       }
-#endif /* WITH_AIXAUTHENTICATE */
+#ifdef CUSTOM_SYS_AUTH_ALLOWED_USER
+       if (!sys_auth_allowed_user(pw))
+               return 0;
+#endif
 
        /* We found no reason not to let this user try to log on... */
        return 1;
@@ -242,7 +221,7 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info)
        /* Raise logging level */
        if (authenticated == 1 ||
            !authctxt->valid ||
-           authctxt->failures >= AUTH_FAIL_LOG ||
+           authctxt->failures >= options.max_authtries / 2 ||
            strcmp(method, "password") == 0)
                authlog = logit;
 
This page took 0.074026 seconds and 4 git commands to generate.