* src/passwd.c: Overflow when computing the number of days based
on the scaling. Use of long long needed.
This commit is contained in:
parent
39cecdab06
commit
8bce7fc016
@ -1,3 +1,8 @@
|
||||
2011-07-14 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/passwd.c: Overflow when computing the number of days based
|
||||
on the scaling. Use of long long needed.
|
||||
|
||||
2011-07-14 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* NEWS, lib/commonio.h, lib/commonio.c: Additional messages to
|
||||
|
10
src/passwd.c
10
src/passwd.c
@ -458,14 +458,14 @@ static void print_status (const struct passwd *pw)
|
||||
|
||||
sp = getspnam (pw->pw_name); /* local, no need for xgetspnam */
|
||||
if (NULL != sp) {
|
||||
(void) printf ("%s %s %s %ld %ld %ld %ld\n",
|
||||
(void) printf ("%s %s %s %lld %lld %lld %lld\n",
|
||||
pw->pw_name,
|
||||
pw_status (sp->sp_pwdp),
|
||||
date_to_str (sp->sp_lstchg * SCALE),
|
||||
(sp->sp_min * SCALE) / DAY,
|
||||
(sp->sp_max * SCALE) / DAY,
|
||||
(sp->sp_warn * SCALE) / DAY,
|
||||
(sp->sp_inact * SCALE) / DAY);
|
||||
((long long)sp->sp_min * SCALE) / DAY,
|
||||
((long long)sp->sp_max * SCALE) / DAY,
|
||||
((long long)sp->sp_warn * SCALE) / DAY,
|
||||
((long long)sp->sp_inact * SCALE) / DAY);
|
||||
} else {
|
||||
(void) printf ("%s %s\n",
|
||||
pw->pw_name, pw_status (pw->pw_passwd));
|
||||
|
Loading…
x
Reference in New Issue
Block a user