From 8dfccc3d813f2d32b541f97fb954e69c9a22f9b2 Mon Sep 17 00:00:00 2001 From: Cristovao Cordeiro Date: Wed, 18 Dec 2024 13:17:20 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: zhijie-yang --- slices/libpam-runtime.yaml | 3 ++- tests/spread/integration/libpam-runtime/task.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/slices/libpam-runtime.yaml b/slices/libpam-runtime.yaml index a41b32025..0f6e1ca0e 100644 --- a/slices/libpam-runtime.yaml +++ b/slices/libpam-runtime.yaml @@ -71,7 +71,8 @@ slices: elif vals[0] == "Session-Interactive-Only": if vals[1].strip() == "yes": m = "session" - elif vals[0] in ["Auth-Initial", "Account-Initial", "Session-Initial", "Password-Initial"]: + elif vals[0] in ["Auth-Initial", "Account-Initial", + "Session-Initial", "Password-Initial"]: d = [] for j in range(i + 1, len(lines)): if ":" in lines[j]: diff --git a/tests/spread/integration/libpam-runtime/task.yaml b/tests/spread/integration/libpam-runtime/task.yaml index 9a7253990..a49243338 100644 --- a/tests/spread/integration/libpam-runtime/task.yaml +++ b/tests/spread/integration/libpam-runtime/task.yaml @@ -6,7 +6,7 @@ execute: | # test that libpam correctly generated things cat "$rootfs"/etc/pam.d/common-account | grep -E "account\s+\[success=1 new_authtok_reqd=done default=ignore\]\s+pam_unix\.so" cat "$rootfs"/etc/pam.d/common-auth | grep -E "auth\s+\[success=1 default=ignore\]\s+pam_unix\.so\s+nullok" - cat "$rootfs"/etc/pam.d/common-password | grep -E "password\s+\[success=1 default=ignore\]\s+pam_unix\.so\s+obscure\s+use_authtok\s+try_first_pass\s+yescrypt" + cat "$rootfs"/etc/pam.d/common-password | grep -E "password\s+\[success=1 default=ignore\]\s+pam_unix\.so\s+obscure\s+yescrypt" cat "$rootfs"/etc/pam.d/common-session | grep -E "session\s+\[default=1\]\s+pam_permit\.so" cat "$rootfs"/etc/pam.d/common-session | grep -E "session\s+required\s+pam_unix\.so" cat "$rootfs"/etc/pam.d/common-session-noninteractive | grep -E "session\s+\[default=1\]\s+pam_permit\.so"