version 1.32, 2000/08/24 20:08:06 |
version 1.33, 2000/09/04 19:15:27 |
|
|
|
|
if (pwd->pw_change || pwd->pw_expire) |
if (pwd->pw_change || pwd->pw_expire) |
(void)gettimeofday(&tp, (struct timezone *)NULL); |
(void)gettimeofday(&tp, (struct timezone *)NULL); |
if (pwd->pw_change) { |
|
if (tp.tv_sec >= pwd->pw_change) { |
|
(void)printf("Sorry -- your password has expired.\n"); |
|
sleepexit(1); |
|
} else if (!quietlog && pwd->pw_change - tp.tv_sec < |
|
login_getcaptime(lc, "password-warn", |
|
2 * DAYSPERWEEK * SECSPERDAY, 2 * DAYSPERWEEK * SECSPERDAY)) |
|
(void)printf("Warning: your password expires on %s", |
|
ctime(&pwd->pw_change)); |
|
} |
|
if (pwd->pw_expire) { |
if (pwd->pw_expire) { |
if (tp.tv_sec >= pwd->pw_expire) { |
if (tp.tv_sec >= pwd->pw_expire) { |
(void)printf("Sorry -- your account has expired.\n"); |
(void)printf("Sorry -- your account has expired.\n"); |
|
|
2 * DAYSPERWEEK * SECSPERDAY, 2 * DAYSPERWEEK * SECSPERDAY)) |
2 * DAYSPERWEEK * SECSPERDAY, 2 * DAYSPERWEEK * SECSPERDAY)) |
(void)printf("Warning: your account expires on %s", |
(void)printf("Warning: your account expires on %s", |
ctime(&pwd->pw_expire)); |
ctime(&pwd->pw_expire)); |
|
} |
|
if (pwd->pw_change) { |
|
if (tp.tv_sec >= pwd->pw_change) { |
|
(void)printf("Sorry -- your password has expired.\n"); |
|
sleepexit(1); |
|
} else if (!quietlog && pwd->pw_change - tp.tv_sec < |
|
login_getcaptime(lc, "password-warn", |
|
2 * DAYSPERWEEK * SECSPERDAY, 2 * DAYSPERWEEK * SECSPERDAY)) |
|
(void)printf("Warning: your password expires on %s", |
|
ctime(&pwd->pw_change)); |
} |
} |
|
|
/* Nothing else left to fail -- really log in. */ |
/* Nothing else left to fail -- really log in. */ |