Merge pull request #138516 from rnhmjoj/lock-kernel-fix

nixos/lock-kernel-modules: reorder before/after
This commit is contained in:
Michele Guerini Rocco 2021-09-20 15:13:12 +02:00 committed by GitHub
commit ea1eae5b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -35,10 +35,10 @@ with lib;
wants = [ "systemd-udevd.service" ];
wantedBy = [ config.systemd.defaultUnit ];
before = [ config.systemd.defaultUnit ];
after =
[ "firewall.service"
"systemd-modules-load.service"
config.systemd.defaultUnit
];
unitConfig.ConditionPathIsReadWrite = "/proc/sys/kernel";

View File

@ -57,6 +57,7 @@ import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... } : {
# Test kernel module hardening
with subtest("No more kernel modules can be loaded"):
# note: this better a be module we normally wouldn't load ...
machine.wait_for_unit("disable-kernel-module-loading.service")
machine.fail("modprobe dccp")