* src/chage.c: Cast 3rd date_to_str parameter to a time_t
This commit is contained in:
parent
05823ad867
commit
4049c0e69e
@ -14,6 +14,7 @@
|
|||||||
shadow_audit_result, use SHADOW_AUDIT_FAILURE instead of 0.
|
shadow_audit_result, use SHADOW_AUDIT_FAILURE instead of 0.
|
||||||
* lib/selinux.c: vasprintf requires _GNU_SOURCE to be defined
|
* lib/selinux.c: vasprintf requires _GNU_SOURCE to be defined
|
||||||
before including stdio.h.
|
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>
|
2011-11-19 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ static int new_fields (void)
|
|||||||
if (-1 == lstchgdate) {
|
if (-1 == lstchgdate) {
|
||||||
strcpy (buf, "-1");
|
strcpy (buf, "-1");
|
||||||
} else {
|
} 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)"));
|
change_field (buf, sizeof buf, _("Last Password Change (YYYY-MM-DD)"));
|
||||||
@ -239,7 +239,7 @@ static int new_fields (void)
|
|||||||
if (-1 == expdate) {
|
if (-1 == expdate) {
|
||||||
strcpy (buf, "-1");
|
strcpy (buf, "-1");
|
||||||
} else {
|
} else {
|
||||||
date_to_str (buf, sizeof buf, expdate * SCALE);
|
date_to_str (buf, sizeof buf, (time_t) expdate * SCALE);
|
||||||
}
|
}
|
||||||
|
|
||||||
change_field (buf, sizeof buf,
|
change_field (buf, sizeof buf,
|
||||||
@ -679,8 +679,8 @@ static void update_age (/*@null@*/const struct spwd *sp,
|
|||||||
struct passwd pwent = *pw;
|
struct passwd pwent = *pw;
|
||||||
|
|
||||||
memzero (&spwent, sizeof spwent);
|
memzero (&spwent, sizeof spwent);
|
||||||
spwent.sp_namp = xstrdup (pw->pw_name);
|
spwent.sp_namp = xstrdup (pwent.pw_name);
|
||||||
spwent.sp_pwdp = xstrdup (pw->pw_passwd);
|
spwent.sp_pwdp = xstrdup (pwent.pw_passwd);
|
||||||
spwent.sp_flag = SHADOW_SP_FLAG_UNSET;
|
spwent.sp_flag = SHADOW_SP_FLAG_UNSET;
|
||||||
|
|
||||||
pwent.pw_passwd = SHADOW_PASSWD_STRING; /* XXX warning: const */
|
pwent.pw_passwd = SHADOW_PASSWD_STRING; /* XXX warning: const */
|
||||||
|
Loading…
Reference in New Issue
Block a user