depot/third_party/nixpkgs/nixos/tests/pam/pam-u2f.nix
Default email c6ca5b8f13 Project import generated by Copybara.
GitOrigin-RevId: e4d49de45a3b5dbcb881656b4e3986e666141ea9
2022-07-18 18:21:45 +02:00

26 lines
533 B
Nix

import ../make-test-python.nix ({ ... }:
{
name = "pam-u2f";
nodes.machine =
{ ... }:
{
security.pam.u2f = {
control = "required";
cue = true;
debug = true;
enable = true;
interactive = true;
origin = "nixos-test";
};
};
testScript =
''
machine.wait_for_unit("multi-user.target")
machine.succeed(
'egrep "auth required .*/lib/security/pam_u2f.so.*debug.*interactive.*cue.*origin=nixos-test" /etc/pam.d/ -R'
)
'';
})