diff options
author | Benny Baumann <BenBE@geshi.org> | 2023-11-13 14:24:08 +0100 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2023-11-14 00:27:49 +0100 |
commit | e5e0985f2a479232ff723e3c67b43accaf167785 (patch) | |
tree | 8e5556a3bef65463cc3efe2050aac0d4f90e5c86 /modules/pam_unix/passverify.c | |
parent | 849f9712703119e7b9924baae9949eeacffacd71 (diff) | |
download | pam-e5e0985f2a479232ff723e3c67b43accaf167785.tar.gz pam-e5e0985f2a479232ff723e3c67b43accaf167785.tar.bz2 pam-e5e0985f2a479232ff723e3c67b43accaf167785.zip |
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 <BenBE@geshi.org>
Diffstat (limited to 'modules/pam_unix/passverify.c')
-rw-r--r-- | modules/pam_unix/passverify.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |