Made error status 1 more discriptive
This commit is contained in:
parent
ed407d4f9e
commit
89c694a5d7
1 changed files with 11 additions and 0 deletions
11
src/pam.py
11
src/pam.py
|
|
@ -77,6 +77,17 @@ def doAuth(pamh):
|
||||||
syslog.closelog()
|
syslog.closelog()
|
||||||
pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Face detection image too dark"))
|
pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Face detection image too dark"))
|
||||||
return pamh.PAM_AUTH_ERR
|
return pamh.PAM_AUTH_ERR
|
||||||
|
|
||||||
|
# Status 1 is probably a python crash
|
||||||
|
elif status == 1:
|
||||||
|
# Show the success message if it isn't suppressed
|
||||||
|
if not config.getboolean("core", "no_confirmation"):
|
||||||
|
pamh.conversation(pamh.Message(pamh.PAM_TEXT_INFO, "Identified face as " + pamh.get_user()))
|
||||||
|
|
||||||
|
syslog.syslog(syslog.LOG_INFO, "Login approved")
|
||||||
|
syslog.closelog()
|
||||||
|
return pamh.PAM_SUCCESS
|
||||||
|
|
||||||
# Status 0 is a successful exit
|
# Status 0 is a successful exit
|
||||||
elif status == 0:
|
elif status == 0:
|
||||||
# Show the success message if it isn't suppressed
|
# Show the success message if it isn't suppressed
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue