<def-group>
  <definition class="compliance" id="rsyslog_files_ownership" version="1">
    <metadata>
      <title>Confirm Existence and Permissions of System Log
      Files</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 6</platform>
      </affected>
      <description>All syslog log files should be owned by the
      appropriate user.</description>
      <reference source="DS" ref_id="20131002" ref_url="test_attestation" />
    </metadata>
    <criteria>
      <criterion comment="check if group root owns all syslog log files" test_ref="test_rsyslog_files_ownership" />
    </criteria>
  </definition>

  <unix:file_test check="all" check_existence="all_exist" comment="Files that end in .log in /var/log owned by root" id="test_rsyslog_files_ownership" version="1">
    <unix:object object_ref="object_rsyslog_files_ownership" />
    <unix:state state_ref="state_rsyslog_files_ownership" />
  </unix:file_test>

  <unix:file_object comment="Files that end in .log in /var/log" id="object_rsyslog_files_ownership" version="2">
    <unix:path>/var/log</unix:path>
    <unix:filename operation="pattern match">.*log</unix:filename>
    <!-- <filter action="exclude">state_rsyslog_files_ownership</filter> -->
  </unix:file_object>

  <unix:file_state id="state_rsyslog_files_ownership" version="1">
    <unix:user_id datatype="int">0</unix:user_id>
  </unix:file_state>
</def-group>
