0
0
Fork 0
mirror of https://github.com/boltgolt/howdy.git synced 2024-09-12 09:41:18 +02:00

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
# 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
# native will stop the prompt at PAM level (can lead to instability!)
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
// 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
pass_task.stop(false);

View file

@ -14,7 +14,7 @@ enum CompareError : int {
ABORT = 12,
TOO_DARK = 13,
INVALID_DEVICE = 14,
TIMEOUT_ACTIVE = 2816
RUBBERSTAMP = 15
};
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
if result is False:
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
if verbose: print("All rubberstamps processed, authentication successful")