#%PAM-1.0
# The backup lock (hyprlock, when the Starchaser lock screen doesn't come up; bin/starchaser-lock): the user's own
# password, nothing else, like the lock screen's own file (config/quickshell/lock/pam.d/starchaser-lock).
# No pam_faillock: through the distro's stack, three typos locked the account (sign-in and sudo too) for 10 minutes,
# and the lock screen never locks the account (decided 2026-10-08). Wrong tries cost the lock screen's waits instead
# (the 5th 30 s, then 60 s, then 90 s), counted with the lock screen's own count by starchaser-lock-wait. Its lines
# are optional or come after pam_unix has failed, so a missing helper never keeps the right password out. A jump
# counts as "ignore" in pam_authenticate, so the right password's success comes from pam_permit, which only that
# jump reaches (the line after it always ends the stack).
auth     optional                 pam_exec.so quiet /usr/local/lib/starchaser/starchaser-lock-wait wait
auth     [success=1 default=bad]  pam_unix.so
auth     [default=die]            pam_exec.so quiet /usr/local/lib/starchaser/starchaser-lock-wait fail
auth     optional                 pam_exec.so quiet /usr/local/lib/starchaser/starchaser-lock-wait ok
auth     optional                 pam_permit.so
account  required pam_unix.so
