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
|
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
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -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")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue