1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-07 12:48:31 +00:00

feat(touchid): add sudo_local support with silent migration

This commit is contained in:
Tw93
2026-01-09 11:02:10 +08:00
parent 7a9a8c7124
commit 2394c5d768
2 changed files with 125 additions and 15 deletions

View File

@@ -9,6 +9,13 @@ set -euo pipefail
# ============================================================================
check_touchid_support() {
# Check sudo_local first (Sonoma+)
if [[ -f /etc/pam.d/sudo_local ]]; then
grep -q "pam_tid.so" /etc/pam.d/sudo_local 2> /dev/null
return $?
fi
# Fallback to checking sudo directly
if [[ -f /etc/pam.d/sudo ]]; then
grep -q "pam_tid.so" /etc/pam.d/sudo 2> /dev/null
return $?