Skip to content

Commit

Permalink
bin/touchid-enable-pam-sudo: use Sonoma's sudo_local instead of sudo.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Sep 29, 2023
1 parent ae61f0e commit 48df92b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/touchid-enable-pam-sudo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
# Enables sudo authentication using TouchID.

pam_sudo_filename = "/etc/pam.d/sudo"
pam_sudo_filename = "/etc/pam.d/sudo_local"
pam_sudo_contents = File.read(pam_sudo_filename)
if pam_sudo_contents.include?("pam_tid.so")
unless ARGV.include?("--quiet")
Expand All @@ -10,7 +10,7 @@ if pam_sudo_contents.include?("pam_tid.so")
exit
end

first_line = "# sudo: auth account password session"
first_line = "# sudo_local: local config file which survives system update and is included for sudo"
first_line_regex = /^#{first_line}$/
unless pam_sudo_contents.match?(first_line_regex)
warn "Error: #{pam_sudo_filename} is not in the expected format!"
Expand Down

0 comments on commit 48df92b

Please sign in to comment.