mirror of
https://gitlab.freedesktop.org/libfprint/fprintd.git
synced 2025-12-20 04:40:05 +01:00
Fix the issue unlimited or long timeout of pam module not working #147
This commit is contained in:
parent
7b16491029
commit
e9b967d4dc
1 changed files with 5 additions and 3 deletions
|
|
@ -516,9 +516,11 @@ do_verify (sd_bus *bus,
|
|||
#ifdef __linux__
|
||||
struct signalfd_siginfo siginfo;
|
||||
#endif
|
||||
int64_t wait_time;
|
||||
int64_t wait_time = INT64_MAX;
|
||||
|
||||
if (verification_end != ULONG_MAX)
|
||||
wait_time = verification_end - now ();
|
||||
|
||||
wait_time = verification_end - now ();
|
||||
if (wait_time <= 0)
|
||||
break;
|
||||
|
||||
|
|
@ -891,7 +893,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc,
|
|||
if (debug)
|
||||
pam_syslog (pamh, LOG_DEBUG, "max_tries specified as: %d", max_tries);
|
||||
}
|
||||
else if (str_has_prefix (argv[i], TIMEOUT_MATCH) && strlen (argv[i]) <= strlen (TIMEOUT_MATCH) + 2)
|
||||
else if (str_has_prefix (argv[i], TIMEOUT_MATCH) && strlen (argv[i]) > strlen (TIMEOUT_MATCH))
|
||||
{
|
||||
int opt_timeout = atoi (argv[i] + strlen (TIMEOUT_MATCH));
|
||||
timeout = (opt_timeout < 0 ? UINT_MAX : (unsigned) opt_timeout);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue