Added config option to enable/disable notification
Default is off
This commit is contained in:
parent
140c8db081
commit
de6dac1fd1
2 changed files with 6 additions and 2 deletions
|
|
@ -2,6 +2,9 @@
|
||||||
# Press CTRL + X to save in the nano editor
|
# Press CTRL + X to save in the nano editor
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
|
# Print that face detection is being attempted
|
||||||
|
show_detection_attempt = false
|
||||||
|
|
||||||
# Do not print anything when a face verification succeeds
|
# Do not print anything when a face verification succeeds
|
||||||
no_confirmation = false
|
no_confirmation = false
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,9 @@ def doAuth(pamh):
|
||||||
if "SSH_CONNECTION" in os.environ or "SSH_CLIENT" in os.environ or "SSHD_OPTS" in os.environ:
|
if "SSH_CONNECTION" in os.environ or "SSH_CLIENT" in os.environ or "SSHD_OPTS" in os.environ:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
# Alert the user that we are doing face detection
|
# Alert the user that we are doing face detection
|
||||||
pamh.conversation(pamh.Message(pamh.PAM_TEXT_INFO, "Attempting face detection"))
|
if config.get("core", "show_detection_attempt") == "true":
|
||||||
|
pamh.conversation(pamh.Message(pamh.PAM_TEXT_INFO, "Attempting face detection"))
|
||||||
|
|
||||||
# Run compare as python3 subprocess to circumvent python version and import issues
|
# Run compare as python3 subprocess to circumvent python version and import issues
|
||||||
status = subprocess.call(["/usr/bin/python3", os.path.dirname(os.path.abspath(__file__)) + "/compare.py", pamh.get_user()])
|
status = subprocess.call(["/usr/bin/python3", os.path.dirname(os.path.abspath(__file__)) + "/compare.py", pamh.get_user()])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue