diff options
Diffstat (limited to 'tests/nixos/root-in-sandbox/default.nix')
-rw-r--r-- | tests/nixos/root-in-sandbox/default.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/nixos/root-in-sandbox/default.nix b/tests/nixos/root-in-sandbox/default.nix new file mode 100644 index 000000000..110d83f86 --- /dev/null +++ b/tests/nixos/root-in-sandbox/default.nix @@ -0,0 +1,15 @@ +let + inherit (import ../util.nix) mkNixBuildTest; +in mkNixBuildTest { + name = "root-in-sandbox"; + extraMachineConfig = { pkgs, ... }: { + security.wrappers.ohno = { + owner = "root"; + group = "root"; + setuid = true; + source = "${pkgs.coreutils}/bin/whoami"; + }; + nix.settings.extra-sandbox-paths = ["/run/wrappers/bin"]; + }; + expressionFile = ./package.nix; +} |