aboutsummaryrefslogtreecommitdiff
path: root/tests/nixos/no-new-privileges/no-sandbox.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nixos/no-new-privileges/no-sandbox.nix')
-rw-r--r--tests/nixos/no-new-privileges/no-sandbox.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/nixos/no-new-privileges/no-sandbox.nix b/tests/nixos/no-new-privileges/no-sandbox.nix
new file mode 100644
index 000000000..d952a6862
--- /dev/null
+++ b/tests/nixos/no-new-privileges/no-sandbox.nix
@@ -0,0 +1,21 @@
+let
+ inherit (import ../util.nix) mkNixBuildTest;
+in
+mkNixBuildTest {
+ name = "no-new-privileges-outside-sandbox";
+ extraMachineConfig =
+ { pkgs, ... }:
+ {
+ security.wrappers.ohno = {
+ owner = "root";
+ group = "root";
+ capabilities = "cap_sys_nice=eip";
+ source = "${pkgs.libcap}/bin/getpcaps";
+ };
+ nix.settings = {
+ extra-sandbox-paths = [ "/run/wrappers/bin/ohno" ];
+ sandbox = false;
+ };
+ };
+ expressionFile = ./package.nix;
+}