diff --git a/ChangeLog b/ChangeLog index 8cc1f43a..985f516a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-13 Nicolas François + + * src/pwconv.c: Use SHADOW_SP_FLAG_UNSET for the initial + value of sp.sp_flag. + * src/pwconv.c: Cast number of days to a long integer. + 2008-06-13 Nicolas François * src/gpasswd.c: The ID argument of audit_logger is an unsigned diff --git a/src/pwconv.c b/src/pwconv.c index 6b4ec1eb..79853341 100644 --- a/src/pwconv.c +++ b/src/pwconv.c @@ -170,16 +170,16 @@ int main (int argc, char **argv) } else { /* add new shadow entry */ memset (&spent, 0, sizeof spent); - spent.sp_namp = pw->pw_name; - spent.sp_min = getdef_num ("PASS_MIN_DAYS", -1); - spent.sp_max = getdef_num ("PASS_MAX_DAYS", -1); - spent.sp_warn = getdef_num ("PASS_WARN_AGE", -1); - spent.sp_inact = -1; + spent.sp_namp = pw->pw_name; + spent.sp_min = getdef_num ("PASS_MIN_DAYS", -1); + spent.sp_max = getdef_num ("PASS_MAX_DAYS", -1); + spent.sp_warn = getdef_num ("PASS_WARN_AGE", -1); + spent.sp_inact = -1; spent.sp_expire = -1; - spent.sp_flag = -1; + spent.sp_flag = SHADOW_SP_FLAG_UNSET; } spent.sp_pwdp = pw->pw_passwd; - spent.sp_lstchg = time ((time_t *) 0) / (24L * 3600L); + spent.sp_lstchg = (long) time ((time_t *) 0) / SCALE; if (spw_update (&spent) == 0) { fprintf (stderr, _