Error code fixes

This commit is contained in:
boltgolt 2023-02-19 15:21:07 +01:00
parent 568a5734d4
commit 215a1dbc2f
No known key found for this signature in database
GPG key ID: BECEC9937E1AAE26
4 changed files with 4 additions and 4 deletions

View file

@ -31,7 +31,7 @@ disabled = false
use_cnn = false use_cnn = false
# Set a workaround to do face and password authentication at the same time # Set a workaround to do face and password authentication at the same time
# off diables concurrency, so password authentication starts after Howdy # off user will have to press enter themselves after a Howdy timeout
# input will send an enter keypress to stop the password prompt # input will send an enter keypress to stop the password prompt
# native will stop the prompt at PAM level (can lead to instability!) # native will stop the prompt at PAM level (can lead to instability!)
workaround = off workaround = off

View file

@ -351,7 +351,7 @@ auto identify(pam_handle_t *pamh, int flags, int argc, const char **argv,
// If python process ran into a timeout // If python process ran into a timeout
// Do not send enter presses or terminate the PAM function, as the user might still be typing their password // Do not send enter presses or terminate the PAM function, as the user might still be typing their password
if (status == CompareError::TIMEOUT_ACTIVE) { if (WEXITSTATUS(status) == CompareError::TIMEOUT_REACHED && WIFEXITED(status)) {
// Wait for the password to be typed // Wait for the password to be typed
pass_task.stop(false); pass_task.stop(false);

View file

@ -14,7 +14,7 @@ enum CompareError : int {
ABORT = 12, ABORT = 12,
TOO_DARK = 13, TOO_DARK = 13,
INVALID_DEVICE = 14, INVALID_DEVICE = 14,
TIMEOUT_ACTIVE = 2816 RUBBERSTAMP = 15
}; };
inline auto get_workaround(const std::string &workaround) -> Workaround { inline auto get_workaround(const std::string &workaround) -> Workaround {

View file

@ -170,7 +170,7 @@ def execute(config, gtk_proc, opencv):
# Abort authentication if the stamp returned false # Abort authentication if the stamp returned false
if result is False: if result is False:
if verbose: print("Authentication aborted by rubber stamp") if verbose: print("Authentication aborted by rubber stamp")
sys.exit(14) sys.exit(15)
# This is outside the for loop, so we've run all the rules # This is outside the for loop, so we've run all the rules
if verbose: print("All rubberstamps processed, authentication successful") if verbose: print("All rubberstamps processed, authentication successful")