<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>CentOS 4</platform>
		<platform>CentOS 5</platform>
		<platform>Red Hat Enterprise Linux 4</platform>
		<platform>Red Hat Enterprise Linux 5</platform>
      </affected>
      <description>Record attempts to alter time through adjtimex.
      </description>
    </metadata>
    <criteria operator="OR">
      <criteria>
        <criteria operator="OR">
	      <extend_definition comment="CentOS 4 is installed" definition_ref="installed_OS_is_centos4" />
	      <extend_definition comment="RedHat 4 is installed" definition_ref="installed_OS_is_rhel4" />
        </criteria>
        <criteria operator="OR">
          <criteria>
            <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_el4" />
          </criteria>
          <criteria>
            <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_el4" />
          </criteria>
        </criteria>
      </criteria>
      <criteria>
        <criteria operator="OR">
	      <extend_definition comment="CentOS 5 is installed" definition_ref="installed_OS_is_centos5" />
	      <extend_definition comment="RedHat 5 is installed" definition_ref="installed_OS_is_rhel5" />
        </criteria>
        <criteria operator="OR">
          <criteria>
            <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_el5" />
          </criteria>
          <criteria>
            <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_el5" />
          </criteria>
        </criteria>
      </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_el4" version="1">
    <ind:object object_ref="obj_audit_rules_time_adjtimex_x86_el4" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_audit_rules_time_adjtimex_x86_el4" version="1">
    <ind:path>/etc</ind:path>
    <ind:filename>audit.rules</ind:filename>
    <ind:pattern operation="pattern match">^[\s]*-a[\s]+exit,always[\s]+-F[\s]+arch=b32.*-S[\s]+adjtimex</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_el4" version="1">
    <ind:object object_ref="obj_audit_rules_time_adjtimex_x86_64_el4" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_audit_rules_time_adjtimex_x86_64_el4" version="1">
    <ind:path>/etc</ind:path>
    <ind:filename>audit.rules</ind:filename>
    <ind:pattern operation="pattern match">^[\s]*-a[\s]+exit,always[\s]+-F[\s]+arch=b64.*-S[\s]+adjtimex</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 32bit -S adjtime and key" id="test_audit_rules_time_adjtimex_x86_el5" version="1">
    <ind:object object_ref="obj_audit_rules_time_adjtimex_x86_el5" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_audit_rules_time_adjtimex_x86_el5" version="1">
    <ind:path>/etc/audit</ind:path>
    <ind:filename>audit.rules</ind:filename>
    <ind:pattern operation="pattern match">^[\s]*-a[\s]+exit,always[\s]+-F[\s]+arch=b32.*-S[\s]+adjtimex</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_el5" version="1">
    <ind:object object_ref="obj_audit_rules_time_adjtimex_x86_64_el5" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_audit_rules_time_adjtimex_x86_64_el5" version="1">
    <ind:path>/etc/audit</ind:path>
    <ind:filename>audit.rules</ind:filename>
    <ind:pattern operation="pattern match">^[\s]*-a[\s]+exit,always[\s]+-F[\s]+arch=b64.*-S[\s]+adjtimex</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
