Skip to content

Commit 6e10851

Browse files
authored
Merge pull request #117 from mrkmg/add-checking-notification
Added notice that facial detection is occurring
2 parents 133f9a5 + de6dac1 commit 6e10851

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/config.ini

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# Press CTRL + X to save in the nano editor
33

44
[core]
5+
# Print that face detection is being attempted
6+
show_detection_attempt = false
7+
58
# Do not print anything when a face verification succeeds
69
no_confirmation = false
710

src/pam.py

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ def doAuth(pamh):
2525
if "SSH_CONNECTION" in os.environ or "SSH_CLIENT" in os.environ or "SSHD_OPTS" in os.environ:
2626
sys.exit(0)
2727

28+
# Alert the user that we are doing face detection
29+
if config.get("core", "show_detection_attempt") == "true":
30+
pamh.conversation(pamh.Message(pamh.PAM_TEXT_INFO, "Attempting face detection"))
31+
2832
# Run compare as python3 subprocess to circumvent python version and import issues
2933
status = subprocess.call(["/usr/bin/python3", os.path.dirname(os.path.abspath(__file__)) + "/compare.py", pamh.get_user()])
3034

0 commit comments

Comments
 (0)