From: Tobias Stoeckmann Date: Thu, 14 Dec 2023 11:11:28 +0000 (+0100) Subject: src/: Fix long/time_t handling X-Git-Tag: 4.15.0-rc1~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a383194ff83ad563a060d798e2cce0a25f317b9;p=thirdparty%2Fshadow.git src/: Fix long/time_t handling Special care has to be taken for 32 bit systems with a 64 bit time_t, since their long data type is still 32 bit. Signed-off-by: Tobias Stoeckmann Link: Signed-off-by: Alejandro Colomar --- diff --git a/src/pwck.c b/src/pwck.c index 535ba4e59..2d6bf2c1f 100644 --- a/src/pwck.c +++ b/src/pwck.c @@ -816,7 +816,7 @@ static void check_spw_file (int *errors, bool *changed) if (!quiet) { time_t t = time (NULL); if ( (t != 0) - && (spw->sp_lstchg > (long) t / DAY)) { + && (spw->sp_lstchg > t / DAY)) { printf (_("user %s: last password change in the future\n"), spw->sp_namp); *errors += 1;