From e5e0985f2a479232ff723e3c67b43accaf167785 Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Mon, 13 Nov 2023 14:24:08 +0100 Subject: pam_unix: avoid integer truncation in debug output When printing the current day and when the password was last changed, a truncation of the value could happen due to incorrect data types used in the format string. Signed-off-by: Benny Baumann --- modules/pam_unix/passverify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/pam_unix') diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c index 9d4ce232..930c7d3c 100644 --- a/modules/pam_unix/passverify.c +++ b/modules/pam_unix/passverify.c @@ -285,7 +285,7 @@ PAMH_ARG_DECL(int check_shadow_expiry, long int curdays; *daysleft = -1; curdays = (long int)(time(NULL) / (60 * 60 * 24)); - D(("today is %d, last change %d", curdays, spent->sp_lstchg)); + D(("today is %ld, last change %ld", curdays, spent->sp_lstchg)); if ((curdays >= spent->sp_expire) && (spent->sp_expire != -1)) { D(("account expired")); return PAM_ACCT_EXPIRED; -- cgit v1.2.3