Skip to content

Commit

Permalink
Fix case-sensitive regex in auditd_audispd_configure_remote_server
Browse files Browse the repository at this point in the history
  • Loading branch information
mpurg committed Apr 19, 2024
1 parent e76fcec commit 3984e2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ AUDITCONFIG={{{ audisp_conf_path }}}/audisp-remote.conf
{{% if 'ubuntu' in product %}}
AUREMOTECONFIG={{{ audisp_conf_path }}}/plugins.d/au-remote.conf

{{{ bash_replace_or_append("$AUREMOTECONFIG", '^active', 'yes') }}}
{{{ set_config_file("$AUREMOTECONFIG", 'active', 'yes', insensitive="true", separator=" = ", separator_regex="\s*=\s*") }}}
{{% endif %}}

{{{ bash_replace_or_append("$AUDITCONFIG", '^remote_server', "$var_audispd_remote_server") }}}
{{{ set_config_file("$AUDITCONFIG", 'remote_server', "$var_audispd_remote_server", insensitive="true", separator=" = ", separator_regex="\s*=\s*") }}}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<ind:filepath>{{{ audisp_config_file_path }}}</ind:filepath>
<!-- Allow only space (exactly) as delimiter -->
<!-- Require at least one space before and after the equal sign -->
<ind:pattern operation="pattern match">^[ ]*remote_server[ ]+=[ ]+(\S+)[ ]*$</ind:pattern>
<ind:pattern operation="pattern match">^[ ]*(?i)remote_server(?-i)[ ]+=[ ]+(\S+)[ ]*$</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>

Expand All @@ -37,7 +37,7 @@

<ind:textfilecontent54_object id="object_au_remote_config" version="1">
<ind:filepath>{{{ auremoteconfig }}}</ind:filepath>
<ind:pattern operation="pattern match">^[ ]*active[ ]+=[ ]+(yes)[ ]*$</ind:pattern>
<ind:pattern operation="pattern match">^[ ]*(?i)active(?-i)[ ]+=[ ]+(yes)[ ]*$</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
{{% endif %}}
Expand Down

0 comments on commit 3984e2e

Please sign in to comment.