Blame SOURCES/scap-security-guide-0.1.67-pwhistory_control-PR_10175.patch

7e8648
From a8236abf709c577152cb96876fcc27c8cf173e66 Mon Sep 17 00:00:00 2001
7e8648
From: Watson Sato <wsato@redhat.com>
7e8648
Date: Wed, 8 Feb 2023 14:42:32 +0100
7e8648
Subject: [PATCH 5/5] Accept required and requisite control flag for
7e8648
 pam_pwhistory
7e8648
7e8648
Patch-name: scap-security-guide-0.1.67-pwhistory_control-PR_10175.patch
7e8648
Patch-status: Accept required and requisite control flag for pam_pwhistory
7e8648
---
7e8648
 controls/cis_rhel8.yml                                        | 2 +-
7e8648
 controls/cis_rhel9.yml                                        | 2 +-
7e8648
 controls/srg_gpos/SRG-OS-000077-GPOS-00045.yml                | 2 +-
7e8648
 .../rule.yml                                                  | 4 ++++
7e8648
 .../var_password_pam_remember_control_flag.var                | 1 +
7e8648
 products/rhel8/profiles/stig.profile                          | 2 +-
7e8648
 tests/data/profile_stability/rhel8/stig.profile               | 2 +-
7e8648
 tests/data/profile_stability/rhel8/stig_gui.profile           | 2 +-
7e8648
 8 files changed, 11 insertions(+), 6 deletions(-)
7e8648
7e8648
diff --git a/controls/cis_rhel8.yml b/controls/cis_rhel8.yml
7e8648
index c0406f97b8..efc53d03fd 100644
7e8648
--- a/controls/cis_rhel8.yml
7e8648
+++ b/controls/cis_rhel8.yml
7e8648
@@ -2267,7 +2267,7 @@ controls:
7e8648
     rules:
7e8648
       - accounts_password_pam_pwhistory_remember_password_auth
7e8648
       - accounts_password_pam_pwhistory_remember_system_auth
7e8648
-      - var_password_pam_remember_control_flag=requisite
7e8648
+      - var_password_pam_remember_control_flag=requisite_or_required
7e8648
       - var_password_pam_remember=5
7e8648
 
7e8648
   - id: 5.5.4
7e8648
diff --git a/controls/cis_rhel9.yml b/controls/cis_rhel9.yml
7e8648
index 7299a39528..30f7e8d182 100644
7e8648
--- a/controls/cis_rhel9.yml
7e8648
+++ b/controls/cis_rhel9.yml
7e8648
@@ -2112,7 +2112,7 @@ controls:
7e8648
     rules:
7e8648
       - accounts_password_pam_pwhistory_remember_password_auth
7e8648
       - accounts_password_pam_pwhistory_remember_system_auth
7e8648
-      - var_password_pam_remember_control_flag=requisite
7e8648
+      - var_password_pam_remember_control_flag=requisite_or_required
7e8648
       - var_password_pam_remember=5
7e8648
 
7e8648
   - id: 5.5.4
7e8648
diff --git a/controls/srg_gpos/SRG-OS-000077-GPOS-00045.yml b/controls/srg_gpos/SRG-OS-000077-GPOS-00045.yml
7e8648
index 1e8286a4a4..b02b7da419 100644
7e8648
--- a/controls/srg_gpos/SRG-OS-000077-GPOS-00045.yml
7e8648
+++ b/controls/srg_gpos/SRG-OS-000077-GPOS-00045.yml
7e8648
@@ -5,7 +5,7 @@ controls:
7e8648
         title: {{{ full_name }}} must prohibit password reuse for a minimum of five generations.
7e8648
         rules:
7e8648
             - var_password_pam_remember=5
7e8648
-            - var_password_pam_remember_control_flag=requisite
7e8648
+            - var_password_pam_remember_control_flag=requisite_or_required
7e8648
             - accounts_password_pam_pwhistory_remember_password_auth
7e8648
             - accounts_password_pam_pwhistory_remember_system_auth
7e8648
         status: automated
7e8648
diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml
7e8648
index c549de2e96..d2b220ef9f 100644
7e8648
--- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml
7e8648
+++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml
7e8648
@@ -129,3 +129,7 @@ warnings:
7e8648
        Newer versions of <tt>authselect</tt> contain an authselect feature to easily and properly
7e8648
        enable <tt>pam_pwhistory.so</tt> module. If this feature is not yet available in your
7e8648
        system, an authselect custom profile must be used to avoid integrity issues in PAM files.
7e8648
+       If a custom profile was created and used in the system before this authselect feature was
7e8648
+       available, the new feature can't be used with this custom profile and the
7e8648
+       remediation will fail. In this case, the custom profile should be recreated or manually
7e8648
+       updated.
7e8648
diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/var_password_pam_remember_control_flag.var b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/var_password_pam_remember_control_flag.var
7e8648
index 8f01007550..1959936c04 100644
7e8648
--- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/var_password_pam_remember_control_flag.var
7e8648
+++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/var_password_pam_remember_control_flag.var
7e8648
@@ -20,4 +20,5 @@ options:
7e8648
     "sufficient": "sufficient"
7e8648
     "binding": "binding"
7e8648
     "ol8": "required,requisite"
7e8648
+    "requisite_or_required": "requisite,required"
7e8648
     default: "requisite"
7e8648
diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile
7e8648
index 8c64868619..a3f7dc9720 100644
7e8648
--- a/products/rhel8/profiles/stig.profile
7e8648
+++ b/products/rhel8/profiles/stig.profile
7e8648
@@ -37,7 +37,7 @@ selections:
7e8648
     - var_accounts_minimum_age_login_defs=1
7e8648
     - var_accounts_max_concurrent_login_sessions=10
7e8648
     - var_password_pam_remember=5
7e8648
-    - var_password_pam_remember_control_flag=requisite
7e8648
+    - var_password_pam_remember_control_flag=requisite_or_required
7e8648
     - var_selinux_state=enforcing
7e8648
     - var_selinux_policy_name=targeted
7e8648
     - var_password_pam_unix_rounds=5000
7e8648
diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile
7e8648
index 6970a32b4f..5d694c6ae1 100644
7e8648
--- a/tests/data/profile_stability/rhel8/stig.profile
7e8648
+++ b/tests/data/profile_stability/rhel8/stig.profile
7e8648
@@ -433,7 +433,7 @@ selections:
7e8648
 - var_accounts_minimum_age_login_defs=1
7e8648
 - var_accounts_max_concurrent_login_sessions=10
7e8648
 - var_password_pam_remember=5
7e8648
-- var_password_pam_remember_control_flag=requisite
7e8648
+- var_password_pam_remember_control_flag=requisite_or_required
7e8648
 - var_selinux_state=enforcing
7e8648
 - var_selinux_policy_name=targeted
7e8648
 - var_password_pam_unix_rounds=5000
7e8648
diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile
7e8648
index 314f14e4f6..e165525b90 100644
7e8648
--- a/tests/data/profile_stability/rhel8/stig_gui.profile
7e8648
+++ b/tests/data/profile_stability/rhel8/stig_gui.profile
7e8648
@@ -441,7 +441,7 @@ selections:
7e8648
 - var_accounts_minimum_age_login_defs=1
7e8648
 - var_accounts_max_concurrent_login_sessions=10
7e8648
 - var_password_pam_remember=5
7e8648
-- var_password_pam_remember_control_flag=requisite
7e8648
+- var_password_pam_remember_control_flag=requisite_or_required
7e8648
 - var_selinux_state=enforcing
7e8648
 - var_selinux_policy_name=targeted
7e8648
 - var_password_pam_unix_rounds=5000
7e8648
-- 
7e8648
2.39.1
7e8648