Update pam.py to respect timeout_notice config option
This commit is contained in:
parent
e4ecd242f8
commit
7a701c4008
1 changed files with 2 additions and 1 deletions
|
|
@ -54,7 +54,8 @@ def doAuth(pamh):
|
||||||
|
|
||||||
# Status 11 means we exceded the maximum retry count
|
# Status 11 means we exceded the maximum retry count
|
||||||
elif status == 11:
|
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.syslog(syslog.LOG_INFO, "Failure, timeout reached")
|
||||||
syslog.closelog()
|
syslog.closelog()
|
||||||
return pamh.PAM_AUTH_ERR
|
return pamh.PAM_AUTH_ERR
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue