<def-group>
  <definition class="compliance" id="audit_rules_enable_syscall_auditing" version="1">
    <metadata>
      <title>Enable Syscall Auditing</title>
      <affected family="unix">
        <platform>multi_platform_all</platform>
      </affected>
      <description>Syscall auditing should not be disabled.</description>
    </metadata>

    <criteria operator="OR">

      <!-- Test the augenrules case -->
      <criteria operator="AND">
        <extend_definition comment="audit augenrules" definition_ref="audit_rules_augenrules" />
        <criterion comment="check that no audit rule exists in /etc/audit/rules.d/*.rules that disables all syscall auditing" test_ref="test_enable_syscall_audit_augenrules" />
      </criteria>

      <!-- OR test the auditctl case -->
      <criteria operator="AND">
        <extend_definition comment="audit auditctl" definition_ref="audit_rules_auditctl" />
        <criterion comment="check that no audit rule exists in /etc/audit/audit.rules that disables all syscall auditing" test_ref="test_enable_syscall_audit_auditctl" />
      </criteria>

    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="none_exist" comment="check that no audit rule exists in /etc/audit/rules.d/*.rules that disables all syscall auditing" id="test_enable_syscall_audit_augenrules" version="1">
    <ind:object object_ref="object_enable_syscall_audit_augenrules" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_enable_syscall_audit_augenrules" version="1">
    <ind:filepath operation="pattern match">^/etc/audit/rules\.d/.*\.rules$</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*-a[\s]+task,never[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" check_existence="none_exist" comment="check that no audit rule exists in /etc/audit/audit.rules that disables all syscall auditing" id="test_enable_syscall_audit_auditctl" version="1">
    <ind:object object_ref="object_enable_syscall_audit_auditctl" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_enable_syscall_audit_auditctl" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*-a[\s]+task,never[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
