]> andersk Git - openssh.git/blobdiff - auth.c
Whoops, forgot changelog
[openssh.git] / auth.c
diff --git a/auth.c b/auth.c
index ccce644a7c319901a97292ba0037fa6a5e7b6af0..d0edab54bc69af3c82598c4e2c2e97866ab23fd2 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -33,7 +33,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth.c,v 1.10 2000/09/07 21:13:36 markus Exp $");
+RCSID("$OpenBSD: auth.c,v 1.11 2000/10/11 20:27:23 markus Exp $");
 
 #include "xmalloc.h"
 #include "rsa.h"
@@ -41,7 +41,6 @@ RCSID("$OpenBSD: auth.c,v 1.10 2000/09/07 21:13:36 markus Exp $");
 #include "pty.h"
 #include "packet.h"
 #include "buffer.h"
-#include "cipher.h"
 #include "mpaux.h"
 #include "servconf.h"
 #include "compat.h"
@@ -81,8 +80,8 @@ allowed_user(struct passwd * pw)
 #ifdef WITH_AIXAUTHENTICATE
        char *loginmsg;
 #endif /* WITH_AIXAUTHENTICATE */
-#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) && \
-       defined(HAS_SHADOW_EXPIRE)
+#if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \
+       !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
   struct spwd *spw;
 
        /* Shouldn't be called if pw is NULL, but better safe than sorry... */
@@ -94,12 +93,12 @@ allowed_user(struct passwd * pw)
                int days = time(NULL) / 86400;
 
                /* Check account expiry */
-               if ((spw->sp_expire > 0) && (days > spw->sp_expire))
+               if ((spw->sp_expire >= 0) && (days > spw->sp_expire))
                        return 0;
 
                /* Check password expiry */
-               if ((spw->sp_lstchg > 0) && (spw->sp_inact > 0) && 
-                       (days > (spw->sp_lstchg + spw->sp_inact)))
+               if ((spw->sp_lstchg >= 0) && (spw->sp_max >= 0) && 
+                   (days > (spw->sp_lstchg + spw->sp_max)))
                        return 0;
        }
 #else
This page took 0.141939 seconds and 4 git commands to generate.