Skip to content

Commit 01b589a

Browse files
committed
systemd-initrd: add test to ensure that the permissions on the systemd generators are correct
1 parent a9c75e7 commit 01b589a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nixos/tests/systemd-initrd-simple.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ import ./make-test-python.nix (
5050
newAvail = machine.succeed("df --output=avail / | sed 1d")
5151
5252
assert int(oldAvail) < int(newAvail), "File system did not grow"
53+
54+
with subtest("no warnings from systemd about write permissions"):
55+
machine.fail("journalctl -b 0 | grep 'is marked world-writable, which is a security risk as it is executed with privileges'")
5356
'';
5457
}
5558
)

0 commit comments

Comments
 (0)