Skip to content

Added notice that facial detection is occurring #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions src/pam.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ 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
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()])

Expand Down