Skip to content

Commit dde2004

Browse files
committed
Fix rsyslog rules due to change in how the configuration files are written.
rsyslog_files_groupownership rsyslog_files_ownership rsyslog_files_permissions Most likely this is what caused the change: https://gitlab.com/redhat/centos-stream/rpms/rsyslog/-/merge_requests/49/diffs
1 parent 82a26ab commit dde2004

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

shared/templates/rsyslog_logfiles_attributes_modify/oval.template

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@
8282
* contains at least one slash '/' character, and simultaneously doesn't contain any
8383
of ';', ':' and space characters,
8484
* the chunk was retrieved from a row not starting with space, '#', or '$' characters
85+
* for newer versions of Rsyslog, there is now only the RainerScript syntax and the
86+
regex now matches both syntaxes.
8587
-->
8688
<ind:pattern
87-
operation="pattern match">^\s*[^(\s|#|\$)]+\s+.*(?:\bFile="|\s|\/|-)(\/[^:;\s"]+).*$</ind:pattern>
89+
operation="pattern match">^\s*[^#$].*?(?:file="([^"\s]+)"|[\s]+-?(\/[^:;\s]+)).*$</ind:pattern>
8890
<ind:instance datatype="int" operation="greater than or equal">1</ind:instance>
8991
<filter action="exclude">state_{{{ _RULE_ID }}}_ignore_include_paths</filter>
9092
</ind:textfilecontent54_object>

0 commit comments

Comments
 (0)