]> granicus.if.org Git - shadow/commitdiff
* src/chage.c: Cast 3rd date_to_str parameter to a time_t
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 19 Nov 2011 21:56:10 +0000 (21:56 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 19 Nov 2011 21:56:10 +0000 (21:56 +0000)
ChangeLog
src/chage.c

index f857c495ba0bf1633befc48a6f5d640f2c82e1e7..8fac7122fd14df29122612f2d0504c79086f516a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@
        shadow_audit_result, use SHADOW_AUDIT_FAILURE instead of 0.
        * lib/selinux.c: vasprintf requires _GNU_SOURCE to be defined
        before including stdio.h.
+       * src/chage.c: Cast 3rd date_to_str parameter to a time_t
 
 2011-11-19  Nicolas François  <nicolas.francois@centraliens.net>
 
index b840e778821225b71d119503bab9b8a07391f5b2..2df65a9490dc5edda95719c6ff33769ad75e6c1c 100644 (file)
@@ -208,7 +208,7 @@ static int new_fields (void)
        if (-1 == lstchgdate) {
                strcpy (buf, "-1");
        } else {
-               date_to_str (buf, sizeof buf, lstchgdate * SCALE);
+               date_to_str (buf, sizeof buf, (time_t) lstchgdate * SCALE);
        }
 
        change_field (buf, sizeof buf, _("Last Password Change (YYYY-MM-DD)"));
@@ -239,7 +239,7 @@ static int new_fields (void)
        if (-1 == expdate) {
                strcpy (buf, "-1");
        } else {
-               date_to_str (buf, sizeof buf, expdate * SCALE);
+               date_to_str (buf, sizeof buf, (time_t) expdate * SCALE);
        }
 
        change_field (buf, sizeof buf,
@@ -679,8 +679,8 @@ static void update_age (/*@null@*/const struct spwd *sp,
                struct passwd pwent = *pw;
 
                memzero (&spwent, sizeof spwent);
-               spwent.sp_namp = xstrdup (pw->pw_name);
-               spwent.sp_pwdp = xstrdup (pw->pw_passwd);
+               spwent.sp_namp = xstrdup (pwent.pw_name);
+               spwent.sp_pwdp = xstrdup (pwent.pw_passwd);
                spwent.sp_flag = SHADOW_SP_FLAG_UNSET;
 
                pwent.pw_passwd = SHADOW_PASSWD_STRING; /* XXX warning: const */