Merge pull request #117 from mrkmg/add-checking-notification
Added notice that facial detection is occurring
This commit is contained in:
commit
6e1085110b
2 changed files with 7 additions and 0 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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,10 @@ 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
|
||||||
|
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