From e39cf86d33966fbbaa7e52530263d9f11370a00b Mon Sep 17 00:00:00 2001 From: Animesh Sahu Date: Fri, 20 May 2022 14:39:27 +0530 Subject: [PATCH] bump 1.94.2 --- meson.build | 4 ++-- pam/pam_fprintd.c | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 64b8297..9062a0a 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('fprintd', 'c', - version: '1.94.1', + version: '1.94.2', license: 'GPLv2+', default_options: [ 'buildtype=debugoptimized', @@ -154,7 +154,7 @@ python3_available_modules = [] foreach module, required : python3_test_modules if required and run_command(python3, '-c', 'import @0@'.format(module)).returncode() != 0 - error('Python3 module \'' + module + '\' required by test suite not found') + warning('Python3 module \'' + module + '\' required by test suite not found') endif endforeach diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c index 06b1cf3..3978bce 100644 --- a/pam/pam_fprintd.c +++ b/pam/pam_fprintd.c @@ -22,6 +22,7 @@ #include #define _GNU_SOURCE +#include #include #include #include @@ -460,7 +461,10 @@ do_verify (sd_bus *bus, verify_data *data) while (data->max_tries > 0) { - uint64_t verification_end = now () + (timeout * USEC_PER_SEC); + uint64_t verification_end = ULONG_MAX; + + if (timeout != UINT_MAX) + verification_end = now () + (timeout * USEC_PER_SEC); data->timed_out = false; data->verify_started = false; @@ -874,7 +878,8 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, } else if (str_has_prefix (argv[i], MAX_TRIES_MATCH) && strlen (argv[i]) > strlen (MAX_TRIES_MATCH)) { - max_tries = atoi (argv[i] + strlen (MAX_TRIES_MATCH)); + int opt_max_tries = atoi (argv[i] + strlen (MAX_TRIES_MATCH)); + max_tries = (opt_max_tries < 0 ? UINT_MAX : (unsigned) opt_max_tries); if (max_tries < 1) { if (debug) @@ -887,7 +892,8 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, } else if (str_has_prefix (argv[i], TIMEOUT_MATCH) && strlen (argv[i]) <= strlen (TIMEOUT_MATCH) + 2) { - timeout = atoi (argv[i] + strlen (TIMEOUT_MATCH)); + int opt_timeout = atoi (argv[i] + strlen (TIMEOUT_MATCH)); + timeout = (opt_timeout < 0 ? UINT_MAX : (unsigned) opt_timeout); if (timeout < MIN_TIMEOUT) { if (debug)