*/
#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"
#include "pty.h"
#include "packet.h"
#include "buffer.h"
-#include "cipher.h"
#include "mpaux.h"
#include "servconf.h"
#include "compat.h"
#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... */
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