| 1234567891011121314151617 |
- #!/bin/bash
- # PAM entry point for fingerprint auth (sudo / polkit).
- # Expected context: pam_exec runs this as root -> drop fully to nebulon
- # (Wine checks the REAL uid against the prefix owner; pam_exec's seteuid alone
- # is not enough and setpriv then fails with exit 127).
- # success => exit 0 => PAM_SUCCESS; anything else => fallback to password.
- export PATH=/usr/local/bin:/usr/bin:/bin
- export HOME=/home/nebulon
- export FP_VERIFY_TIMEOUT="${FP_VERIFY_TIMEOUT:-15}"
- if [ "$(id -u)" = "0" ]; then
- exec setpriv --reuid=nebulon --regid=nebulon --init-groups \
- /home/nebulon/projects/fingerprint/work/fp-verify.sh
- else
- # already the target user (manual test / corrected PAM context)
- exec /home/nebulon/projects/fingerprint/work/fp-verify.sh
- fi
|