Undo part of the previous; don't allow logins if we've passed pw_change.
The semantics of this are not well documented. *sigh*
This commit is contained in:
parent
97734d5e35
commit
83ef48db0a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: login.c,v 1.30 1997/10/12 15:11:24 mycroft Exp $ */
|
||||
/* $NetBSD: login.c,v 1.31 1997/10/12 15:21:24 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
|
||||
|
@ -44,7 +44,7 @@ __COPYRIGHT(
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94";
|
||||
#endif
|
||||
__RCSID("$NetBSD: login.c,v 1.30 1997/10/12 15:11:24 mycroft Exp $");
|
||||
__RCSID("$NetBSD: login.c,v 1.31 1997/10/12 15:21:24 mycroft Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
|
@ -411,9 +411,10 @@ main(argc, argv)
|
|||
if (pwd->pw_change)
|
||||
if (pwd->pw_change == _PASSWORD_CHGNOW)
|
||||
need_chpass = 1;
|
||||
else if (tp.tv_sec >= pwd->pw_change)
|
||||
need_chpass = 1;
|
||||
else if (pwd->pw_change - tp.tv_sec <
|
||||
else if (tp.tv_sec >= pwd->pw_change) {
|
||||
(void)printf("Sorry -- your password has expired.\n");
|
||||
sleepexit(1);
|
||||
} else if (pwd->pw_change - tp.tv_sec <
|
||||
_PASSWORD_WARNDAYS * SECSPERDAY && !quietlog)
|
||||
(void)printf("Warning: your password expires on %s",
|
||||
ctime(&pwd->pw_change));
|
||||
|
|
Loading…
Reference in New Issue