From 001b6209765cca60be34066f1ba2f56ea7e44e69 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Tue, 27 Jan 2026 14:48:19 -0600 Subject: [PATCH 1/2] Fix expand_xccdf_subs regexs to less gready --- ssg/build_remediations.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ssg/build_remediations.py b/ssg/build_remediations.py index 3756992c7825..44cc9269eed8 100644 --- a/ssg/build_remediations.py +++ b/ssg/build_remediations.py @@ -653,20 +653,20 @@ def expand_xccdf_subs(fix, remediation_type): fix_text ) - pattern = r'\(ansible-populate\s*(\S+)\)' + pattern = r'\(ansible-populate\s*([a-zA-Z0-9_]+)\)' elif remediation_type == "puppet": - pattern = r'\(puppet-populate\s*(\S+)\)' + pattern = r'\(puppet-populate\s*([a-zA-Z0-9_]+)\)' elif remediation_type == "anaconda": - pattern = r'\(anaconda-populate\s*(\S+)\)' + pattern = r'\(anaconda-populate\s*([a-zA-Z0-9_]+)\)' elif remediation_type == "bash": - pattern = r'\(bash-populate\s*(\S+)\)' + pattern = r'\(bash-populate\s*([a-zA-Z0-9_]+)\)' elif remediation_type == "kickstart": - pattern = r'\(kickstart-populate\s*(\S+)\)' + pattern = r'\(kickstart-populate\s*([a-zA-Z0-9_]+)\)' elif remediation_type == "bootc": - pattern = r'\(bootc-populate\s*(\S+)\)' + pattern = r'\(bootc-populate\s*([a-zA-Z0-9_]+)\)' else: sys.stderr.write("Unknown remediation type '%s'\n" % (remediation_type)) sys.exit(1) From edda243cf59d3d257f3518fcb1434633a6ccdc92 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Wed, 28 Jan 2026 12:09:16 -0600 Subject: [PATCH 2/2] Fix variable `login_banner_text` setting in banner_etc_issue The previously values with `'` would not work. --- .../accounts/accounts-banners/banner_etc_issue/bash/shared.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/bash/shared.sh b/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/bash/shared.sh index 69ced081bc02..177d34e2a3b7 100644 --- a/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/bash/shared.sh +++ b/linux_os/guide/system/accounts/accounts-banners/banner_etc_issue/bash/shared.sh @@ -1,6 +1,8 @@ # platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu,multi_platform_almalinux -login_banner_text='(bash-populate login_banner_text)' +read -r -d '' login_banner_text <<'EOF' || true +(bash-populate login_banner_text) +EOF # Multiple regexes transform the banner regex into a usable banner # 0 - Remove anchors around the banner text