Test whether PAM resource limits work

This commit is contained in:
Eelco Dolstra 2013-10-17 15:37:08 +02:00
parent ff74d78c9d
commit 8c047d4f2c

View File

@ -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");
'';
}