aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing/archsetup-test.conf
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
commitc80e85545be3b1ab98b69771f502b7b36102c7f6 (patch)
tree53da27e3db108accbba0a7cae760647ed5b7549c /scripts/testing/archsetup-test.conf
parent577088700e78afc9ee1d5cad352768cdf108ffe8 (diff)
downloadarchsetup-c80e85545be3b1ab98b69771f502b7b36102c7f6.tar.gz
archsetup-c80e85545be3b1ab98b69771f502b7b36102c7f6.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/testing/archsetup-test.conf')
0 files changed, 0 insertions, 0 deletions