From d04bf863816f00125de04500f8c8a4c0a090f93b Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Tue, 20 May 2025 15:14:55 +0900 Subject: [PATCH] nixos.tests.pam-file-contents: fix build failure This fixes the test for pam file contents. The pam file started using fully-qualified paths in the following commit. 7306423158ba8d6e5d5674c4d6a7fcfea3c75f84 --- nixos/tests/pam/pam-file-contents.nix | 4 ++-- nixos/tests/pam/test_chfn.py | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nixos/tests/pam/pam-file-contents.nix b/nixos/tests/pam/pam-file-contents.nix index 18f61d0b0beb..50551d8fd340 100644 --- a/nixos/tests/pam/pam-file-contents.nix +++ b/nixos/tests/pam/pam-file-contents.nix @@ -25,8 +25,8 @@ import ../make-test-python.nix ( testScript = builtins.replaceStrings - [ "@@pam_ccreds@@" "@@pam_krb5@@" ] - [ pkgs.pam_ccreds.outPath pkgs.pam_krb5.outPath ] + [ "@@pam@@" "@@pam_ccreds@@" "@@pam_krb5@@" ] + [ pkgs.pam.outPath pkgs.pam_ccreds.outPath pkgs.pam_krb5.outPath ] (builtins.readFile ./test_chfn.py); } ) diff --git a/nixos/tests/pam/test_chfn.py b/nixos/tests/pam/test_chfn.py index 3cfbb3908e9d..900feb35f4b3 100644 --- a/nixos/tests/pam/test_chfn.py +++ b/nixos/tests/pam/test_chfn.py @@ -1,17 +1,17 @@ expected_lines = { - "account required pam_unix.so", + "account required @@pam@@/lib/security/pam_unix.so", "account sufficient @@pam_krb5@@/lib/security/pam_krb5.so", "auth [default=die success=done] @@pam_ccreds@@/lib/security/pam_ccreds.so action=validate use_first_pass", "auth [default=ignore success=1 service_err=reset] @@pam_krb5@@/lib/security/pam_krb5.so use_first_pass", - "auth required pam_deny.so", + "auth required @@pam@@/lib/security/pam_deny.so", "auth sufficient @@pam_ccreds@@/lib/security/pam_ccreds.so action=store use_first_pass", - "auth sufficient pam_rootok.so", - "auth sufficient pam_unix.so likeauth try_first_pass", + "auth sufficient @@pam@@/lib/security/pam_rootok.so", + "auth sufficient @@pam@@/lib/security/pam_unix.so likeauth try_first_pass", "password sufficient @@pam_krb5@@/lib/security/pam_krb5.so use_first_pass", - "password sufficient pam_unix.so nullok yescrypt", + "password sufficient @@pam@@/lib/security/pam_unix.so nullok yescrypt", "session optional @@pam_krb5@@/lib/security/pam_krb5.so", - "session required pam_env.so conffile=/etc/pam/environment readenv=0", - "session required pam_unix.so", + "session required @@pam@@/lib/security/pam_env.so conffile=/etc/pam/environment readenv=0", + "session required @@pam@@/lib/security/pam_unix.so", } actual_lines = set(machine.succeed("cat /etc/pam.d/chfn").splitlines())