<def-group>
  <definition class="compliance"
  id="audit_rules_time_adjtimex" version="1">
    <metadata>
      <title>Record Attempts to Alter Time Through Adjtimex</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 6</platform>
      </affected>
      <description>Record attempts to alter time through adjtimex.
      </description>
      <reference source="DS" ref_id="20131011" ref_url="test_attestation" />
    </metadata>
    <criteria comment="Test for either..." operator="OR">
      <criteria comment="both..." operator="AND">
        <extend_definition comment="32bit and ..." 
        definition_ref="system_info_architecture_x86" />
        <criterion comment="32bit line adjtimex and key present"
        test_ref="test_audit_rules_time_adjtimex_x86" />
      </criteria>
      <criteria comment="both ..." operator="AND">
        <extend_definition comment="64bit and ..." 
        definition_ref="system_info_architecture_x86_64" />
        <criterion comment="64bit line for adjtimex and key present"
        test_ref="test_audit_rules_time_adjtimex_x86_64" />
      </criteria>
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all"
  check_existence="at_least_one_exists"
  comment="Tests the for presence of 32bit -S adjtime and key"
  id="test_audit_rules_time_adjtimex_x86" version="1">
    <ind:object object_ref="obj_audit_rules_time_adjtimex_x86" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_audit_rules_time_adjtimex_x86"
  version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern 
    operation="pattern match">^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b32.*-S[\s]+adjtimex[\s]+.*-k[\s]+[\S]+[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all"
  check_existence="at_least_one_exists"
  comment="Tests the for presence of 64bit -S adjtime and key"
  id="test_audit_rules_time_adjtimex_x86_64" version="1">
    <ind:object object_ref="obj_audit_rules_time_adjtimex_x86_64" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_audit_rules_time_adjtimex_x86_64"
  version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern 
    operation="pattern match">^[\s]*-a[\s]+always,exit[\s]+-F[\s]+arch=b64.*-S[\s]+adjtimex[\s]+.*-k[\s]+[\S]+[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
