0
0
Fork 0
mirror of https://github.com/boltgolt/howdy.git synced 2024-09-19 09:51:19 +02:00

Added config option to enable/disable notification

Default is off
This commit is contained in:
Kevin Gravier 2019-01-04 15:26:38 -05:00
parent 140c8db081
commit de6dac1fd1
2 changed files with 6 additions and 2 deletions

View file

@ -2,6 +2,9 @@
# Press CTRL + X to save in the nano editor
[core]
# Print that face detection is being attempted
show_detection_attempt = false
# Do not print anything when a face verification succeeds
no_confirmation = false

View file

@ -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:
sys.exit(0)
# Alert the user that we are doing face detection
pamh.conversation(pamh.Message(pamh.PAM_TEXT_INFO, "Attempting face detection"))
# Alert the user that we are doing 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
status = subprocess.call(["/usr/bin/python3", os.path.dirname(os.path.abspath(__file__)) + "/compare.py", pamh.get_user()])