]> granicus.if.org Git - shadow/commitdiff
* src/pwconv.c: Use SHADOW_SP_FLAG_UNSET for the initial
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 13 Jun 2008 20:33:38 +0000 (20:33 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 13 Jun 2008 20:33:38 +0000 (20:33 +0000)
value of sp.sp_flag.
* src/pwconv.c: Cast number of days to a long integer.

ChangeLog
src/pwconv.c

index 8cc1f43a09572245aae06e34dbec77bf6513bf25..985f516a63b7105fe9664b819077f43c14d1b969 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-13  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * 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  <nicolas.francois@centraliens.net>
 
        * src/gpasswd.c: The ID argument of audit_logger is an unsigned
index 6b4ec1ebbed1d3a366230d75424e23213efe3062..79853341b57eb6ff0624bfad1677724f732d7088 100644 (file)
@@ -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,
                                 _