Skip to content

Commit

Permalink
Update Test Platforms for RHEL 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Mab879 committed Jan 13, 2025
1 parent 2b3b654 commit ccc562a
Show file tree
Hide file tree
Showing 36 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

{{{ setup_auditctl_environment() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = audit
# platform = Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
# platform = multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_cis

path="/var/run/faillock"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Red Hat Enterprise Linux 9
# platform = Red Hat Enterprise Linux 9, Red Hat Enterprise Linux 10
# profiles = xccdf_org.ssgproject.content_profile_ospp

mkdir -p /etc/ssh/sshd_config.d
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

authselect create-profile test_profile -b sssd
authselect select "custom/test_profile" --force
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

authselect create-profile test_profile -b sssd
authselect select "custom/test_profile" --force
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

authselect create-profile test_profile -b sssd
authselect select "custom/test_profile" --force
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

authselect create-profile test_profile -b sssd
authselect select "custom/test_profile" --force
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

pam_files=("password-auth" "system-auth")

Expand All @@ -20,7 +20,7 @@ for file in ${pam_files[@]}; do
if grep -qP "auth.*faillock\.so.*preauth" $CUSTOM_PROFILE_DIR/$file; then
sed -i "/^\s*auth.*faillock\.so.*preauth/ s/$/even_deny_root/" \
"$CUSTOM_PROFILE_DIR/$file"
else
else
sed -i "0,/^\s*auth.*/i auth required pam_faillock.so preauth even_deny_root" \
"$CUSTOM_PROFILE_DIR/$file"
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# variables = var_password_pam_retry=3

source common.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# variables = var_password_pam_retry=3

source common.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# variables = var_password_pam_retry=3

source common.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# variables = var_password_pam_retry=3

source common.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# variables = var_password_pam_retry=3

source common.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Red Hat Enterprise Linux 9
# platform = Red Hat Enterprise Linux 9,Red Hat Enterprise Linux 10

# Clean sysctl config directories
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Red Hat Enterprise Linux 9
# platform = Red Hat Enterprise Linux 9,Red Hat Enterprise Linux 10

# Clean sysctl config directories
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Red Hat Enterprise Linux 9
# platform = Red Hat Enterprise Linux 9,Red Hat Enterprise Linux 10

# Clean sysctl config directories
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Red Hat Enterprise Linux 9
# platform = Red Hat Enterprise Linux 9,Red Hat Enterprise Linux 10

# Clean sysctl config directories
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# packages = crypto-policies-scripts

# IMPORTANT: This is a false negative scenario.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# packages = crypto-policies-scripts

update-crypto-policies --set "DEFAULT"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_ospp
# packages = crypto-policies-scripts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_ospp
# packages = crypto-policies-scripts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_ospp
# packages = crypto-policies-scripts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# profiles = xccdf_org.ssgproject.content_profile_ospp
# packages = crypto-policies-scripts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,pam
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

{{{ tests_init_faillock_vars("correct") }}}

Expand All @@ -23,7 +23,7 @@ for file in ${pam_files[@]}; do
if grep -qP "auth.*faillock\.so.*preauth" $CUSTOM_PROFILE_DIR/$file; then
sed -i "/^\s*auth.*faillock\.so.*preauth/ s/$/$PRM_NAME=$TEST_VALUE/" \
"$CUSTOM_PROFILE_DIR/$file"
else
else
sed -i "0,/^\s*auth.*/i auth required pam_faillock.so preauth $PRM_NAME=$TEST_VALUE" \
"$CUSTOM_PROFILE_DIR/$file"
fi
Expand Down

0 comments on commit ccc562a

Please sign in to comment.