From 8c047d4f2cf195152d3435d580ffe740f8f87917 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 17 Oct 2013 15:37:08 +0200 Subject: Test whether PAM resource limits work --- nixos/tests/openssh.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nixos/tests') 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"); ''; } -- cgit 1.4.1