Skip to content

Instantly share code, notes, and snippets.

# Useful pam_exec program to do quick local sudo-auth.
# eg. add the following to /etc/pam.d/system-auth:
# auth sufficient pam_exec.so quiet stdout /usr/local/sbin/extra_sudo_auth
# Intention:
# Exit with 0 if right control & shift are held down simultaneously
# Fail immediately if left control or left shift are pressed
# Fail after a timeout
import asyncfile