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:
parent
568a5734d4
commit
215a1dbc2f
4 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue