uunicorn / python-validity

Validity fingerprint sensor prototype
MIT License
995 stars 83 forks source link

Feature Request: refuse scanning if laptop lid is closed #66

Open intelfx opened 3 years ago

intelfx commented 3 years ago

Using pam_fprint.so to handle authentication system-wide becomes unusable if the laptop is ever used with docks or external displays. Because PAM is not gaining multiple parallel module support anytime soon, I'd propose a workaround in form of rejecting scanning requests if the laptop lid is closed. The laptop lid status can be acquired from logind:

$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager LidClosed
b true

_Note: I'm not sure that this feature request is in the right place (maybe something to implement in fprintd or pamfprint.so), but given that this specific driver handles devices that are only(?) found in laptops, it probably makes sense to do it here.

anymouse404 commented 2 years ago

This feature would be very useful to me as well.