systemd-initrd: add test to ensure that the permissions on the systemd generators are correct

This commit is contained in:
r-vdp 2025-05-08 12:32:46 +02:00
parent a9c75e7689
commit 01b589a7f8
No known key found for this signature in database

View File

@ -50,6 +50,9 @@ import ./make-test-python.nix (
newAvail = machine.succeed("df --output=avail / | sed 1d")
assert int(oldAvail) < int(newAvail), "File system did not grow"
with subtest("no warnings from systemd about write permissions"):
machine.fail("journalctl -b 0 | grep 'is marked world-writable, which is a security risk as it is executed with privileges'")
'';
}
)