-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SLE Add rsyslog_remote_loghost droping remediations #10672
SLE Add rsyslog_remote_loghost droping remediations #10672
Conversation
Skipping CI for Draft Pull Request. |
Use it to remove all current rsyslog loghost settings in rsyslog_remote_loghost rule
{{{ bash_comment_config_line("/etc/rsyslog.conf", '^*.*') }}} | ||
{{{ bash_comment_config_line("/etc/rsyslog.d/*.conf", '^*.*') }}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dots and asterisks need to be escaped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the note, experienced some strange behaviour with \>
so reworked that part in a28e9bc
@@ -1598,6 +1598,18 @@ fi | |||
:type format: str | |||
|
|||
#}} | |||
|
|||
{{%- macro bash_comment_config_line(config_file, key) -%}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This macro needs to be tested by a BATS test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very useful indeed, haven't had the BATS pleasure so far 👍 done in 4438714
Strange enough usage of `\>` and `\` for escaping `.` and `*` produces unexpected results. As in test string `*.* Something` does not match regex `^\*\.\*\>` but matches `^*.*\>`. Since usage of the `\>` seems missin in other implmenetations(PCRE, Javascript etc), decided to change it to [[:blank:]], and escape every special symbol like `*` or `.` with '\' for better readability.
Code Climate has analyzed commit 4438714 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 52.8% (0.0% change). View more on Code Climate. |
/packit retest |
Description:
Rationale: