summaryrefslogtreecommitdiffstats
path: root/nixos/tests/hardened.nix
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2017-09-16 11:46:26 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2017-09-16 13:14:07 +0200
commit586d04c5886f1db6fe23c15b71f1d4d38bde854f (patch)
treeaa1ecaf782f83a4e3522fac00a04b553d8e65f85 /nixos/tests/hardened.nix
parent62fa45eac52136d10735ca65d4b9284e15686815 (diff)
nixos/tests: expand hardened tests
Diffstat (limited to 'nixos/tests/hardened.nix')
-rw-r--r--nixos/tests/hardened.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/tests/hardened.nix b/nixos/tests/hardened.nix
index 1d9a9043e03a..ee7ffe83ba34 100644
--- a/nixos/tests/hardened.nix
+++ b/nixos/tests/hardened.nix
@@ -32,5 +32,15 @@ import ./make-test.nix ({ pkgs, ...} : {
subtest "userns", sub {
$machine->fail("unshare --user");
};
+
+ # Test dmesg restriction
+ subtest "dmesg", sub {
+ $machine->fail("su -l alice -c dmesg");
+ };
+
+ # Test access to kcore
+ subtest "kcore", sub {
+ $machine->fail("cat /proc/kcore");
+ };
'';
})