aboutsummaryrefslogtreecommitdiff
path: root/scripts/setup-chess-README.md
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-20 15:44:29 -0500
committerCraig Jennings <c@cjennings.net>2026-07-20 15:44:29 -0500
commita55800c79ab1fe55cba151018ad849750b4e5946 (patch)
tree53da27e3db108accbba0a7cae760647ed5b7549c /scripts/setup-chess-README.md
parent7b57eb8a801887b15e8c54f25aae167e07917bec (diff)
downloadarchsetup-a55800c79ab1fe55cba151018ad849750b4e5946.tar.gz
archsetup-a55800c79ab1fe55cba151018ad849750b4e5946.zip
fix(installer): validate sudoers.pacnew with visudo before copying
The installer copied /etc/sudoers.pacnew over /etc/sudoers with no validation. A malformed pacnew that sudo refuses to parse would replace a working sudoers with an unparseable one, locking out privilege escalation right before the NOPASSWD rule gets appended. replace_sudoers_pacnew now runs `visudo -cf` on the pacnew first and only copies a file that validates; a failure warns and leaves the current sudoers in place. Extracted the logic into a function taking the pacnew and target as positional args defaulting to the system paths, so the guard can run against fixtures.
Diffstat (limited to 'scripts/setup-chess-README.md')
0 files changed, 0 insertions, 0 deletions