Skip to content

Update dconf_gnome_login_banner_text ansible playbook to filter out regular expression elements #4574

@ggbecker

Description

@ggbecker

Description of problem:

Update ansible playbooks to filter out regular expression elements from login banners the same as bash remediation do:

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;')

Here is the ansible playbook:

Addition Information:

This is something intentionally targeted to be fixed in #3679 but priorities have been changed so this is issue is being created to not block the PR.

#3679 fixed several issues with bash remediation for dconf_gnome_login_banner_text but test scenarios to cover all possible variable values are missing and the OVAL check still doesn't know how to handle when key=value is under some wrong section leading to a false positive, for example:

[org/gnome/wrong-section]
banner-message-text='Valid value' 

Metadata

Metadata

Assignees

No one assigned

    Labels

    AnsibleAnsible remediation update.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions