From 7a701c40084824dd336acd199b066fb7e892fac6 Mon Sep 17 00:00:00 2001 From: Nick Clark <64603152+nickrbclark@users.noreply.github.com> Date: Wed, 10 Feb 2021 09:13:57 -0500 Subject: [PATCH] Update pam.py to respect timeout_notice config option --- src/pam.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pam.py b/src/pam.py index 08cccef..b695915 100644 --- a/src/pam.py +++ b/src/pam.py @@ -54,7 +54,8 @@ def doAuth(pamh): # Status 11 means we exceded the maximum retry count elif status == 11: - pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Face detection timeout reached")) + if config.getboolean("core", "timeout_notice"): + pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Face detection timeout reached")) syslog.syslog(syslog.LOG_INFO, "Failure, timeout reached") syslog.closelog() return pamh.PAM_AUTH_ERR