From d49298dd5398d34fe4cfd035d416c6ee126f5c95 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Wed, 26 Nov 2003 08:50:59 +0000 Subject: [PATCH] Relevant BUGIDs: 849498 Purpose of commit: bugfix Commit summary: --------------- The type of remember in support.c is int, not long. But we compare remember with LONG_MIN and LONG_MAX. While this works on 32bit architectures, this fails on 64bit one. INT_MIN and INT_MAX should be used. --- modules/pam_unix/support.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c index 5d62bfec..1b55d23b 100644 --- a/modules/pam_unix/support.c +++ b/modules/pam_unix/support.c @@ -167,7 +167,7 @@ int _set_ctrl(pam_handle_t *pamh, int flags, int *remember, int argc, if (remember != NULL) { if (j == UNIX_REMEMBER_PASSWD) { *remember = strtol(*argv + 9, NULL, 10); - if ((*remember == LONG_MIN) || (*remember == LONG_MAX)) + if ((*remember == INT_MIN) || (*remember == INT_MAX)) *remember = -1; if (*remember > 400) *remember = 400; -- 2.40.0