Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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)"
login_banner_text='(bash-populate login_banner_text)'

# Multiple regexes transform the banner regex into a usable banner
# 0 - Remove anchors around the banner text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# platform = multi_platform_all

login_banner_text="(bash-populate login_banner_text)"
login_banner_text='(bash-populate login_banner_text)'

# Multiple regexes transform the banner regex into a usable banner
# 0 - Remove anchors around the banner text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_fedora
# profiles = xccdf_org.ssgproject.content_profile_stig
# packages = dconf,gdm

login_banner_text="Wrong Banner Text"
expanded=$(echo "$login_banner_text" | sed 's/(\\\\\x27)\*/\\\x27/g;s/(\\\x27)\*//g;s/(\\\\\x27)/tamere/g;s/(\^\(.*\)\$|.*$/\1/g;s/\[\\s\\n\][+*]/ /g;s/\\//g;s/(n)\*/\\n/g;s/\x27/\\\x27/g;')
Expand Down
2 changes: 1 addition & 1 deletion shared/macros/10-bash.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ EOF

{{# Strips newline or newline escape sequence regex #}}
{{% macro bash_deregexify_banner_newline(banner_var_name, newline) -%}}
{{{ banner_var_name }}}=$(echo "${{{ banner_var_name }}}" | sed 's/(?:\[\\n\]+|(?:\\n)+)/{{{ newline }}}/g')
{{{ banner_var_name }}}=$(echo "${{{ banner_var_name }}}" | sed 's/(?:\[\\n\]+|(?:\\\\n)+)/{{{ newline }}}/g')
{{%- endmacro %}}


Expand Down
Loading