diff --git a/libmisc/pwd2spwd.c b/libmisc/pwd2spwd.c index c1b9b29a..6799dd50 100644 --- a/libmisc/pwd2spwd.c +++ b/libmisc/pwd2spwd.c @@ -40,7 +40,6 @@ #include "prototypes.h" #include "defines.h" #include -extern time_t time (time_t *); /* * pwd_to_spwd - create entries for new spwd structure @@ -66,7 +65,7 @@ struct spwd *pwd_to_spwd (const struct passwd *pw) */ sp.sp_min = 0; sp.sp_max = (10000L * DAY) / SCALE; - sp.sp_lstchg = (long) time ((time_t *) 0) / SCALE; + sp.sp_lstchg = (long) gettime () / SCALE; if (0 == sp.sp_lstchg) { /* Better disable aging than requiring a password * change */ diff --git a/src/pwck.c b/src/pwck.c index 0ffb711e..f70071b1 100644 --- a/src/pwck.c +++ b/src/pwck.c @@ -609,7 +609,7 @@ static void check_pw_file (int *errors, bool *changed) sp.sp_inact = -1; sp.sp_expire = -1; sp.sp_flag = SHADOW_SP_FLAG_UNSET; - sp.sp_lstchg = (long) time ((time_t *) 0) / SCALE; + sp.sp_lstchg = (long) gettime () / SCALE; if (0 == sp.sp_lstchg) { /* Better disable aging than * requiring a password change diff --git a/src/pwconv.c b/src/pwconv.c index 9c69fa13..f932f266 100644 --- a/src/pwconv.c +++ b/src/pwconv.c @@ -267,7 +267,7 @@ int main (int argc, char **argv) spent.sp_flag = SHADOW_SP_FLAG_UNSET; } spent.sp_pwdp = pw->pw_passwd; - spent.sp_lstchg = (long) time ((time_t *) 0) / SCALE; + spent.sp_lstchg = (long) gettime () / SCALE; if (0 == spent.sp_lstchg) { /* Better disable aging than requiring a password * change */