about summary refs log tree commit diff
path: root/nixos/tests/openssh.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-17 15:37:08 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-17 15:37:08 +0200
commit8c047d4f2cf195152d3435d580ffe740f8f87917 (patch)
tree6c998e666e7529c6bc72f930f4661bce69ad1b9a /nixos/tests/openssh.nix
parentff74d78c9d97f39db3a995432e7b3c4b00ce2c61 (diff)
downloadnixlib-8c047d4f2cf195152d3435d580ffe740f8f87917.tar
nixlib-8c047d4f2cf195152d3435d580ffe740f8f87917.tar.gz
nixlib-8c047d4f2cf195152d3435d580ffe740f8f87917.tar.bz2
nixlib-8c047d4f2cf195152d3435d580ffe740f8f87917.tar.lz
nixlib-8c047d4f2cf195152d3435d580ffe740f8f87917.tar.xz
nixlib-8c047d4f2cf195152d3435d580ffe740f8f87917.tar.zst
nixlib-8c047d4f2cf195152d3435d580ffe740f8f87917.zip
Test whether PAM resource limits work
Diffstat (limited to 'nixos/tests/openssh.nix')
-rw-r--r--nixos/tests/openssh.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/tests/openssh.nix b/nixos/tests/openssh.nix
index 16757cf9098e..49d92fbde908 100644
--- a/nixos/tests/openssh.nix
+++ b/nixos/tests/openssh.nix
@@ -8,6 +8,8 @@
 
       {
         services.openssh.enable = true;
+        security.pam.services.sshd.limits =
+          [ { domain = "*"; item = "memlock"; type = "-"; value = 1024; } ];
       };
 
     client =
@@ -31,5 +33,6 @@
 
     $client->waitForUnit("network.target");
     $client->succeed("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server 'echo hello world' >&2");
+    $client->succeed("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server 'ulimit -l' | grep 1024");
   '';
 }