<def-group>
  <definition class="compliance"
  id="audit_rules_sethostname" version="1">
    <metadata>
      <title>Record Attempts to Alter Host Name</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 the host name.</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>
        <criterion test_ref="test_audit_rules_sethostname_el4" />
      </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>
        <criterion test_ref="test_audit_rules_sethostname_el5" />
      </criteria>
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="Tests the for presence of sethostname" id="test_audit_rules_sethostname_el4" version="1">
    <ind:object object_ref="obj_audit_rules_sethostname_el4" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_audit_rules_sethostname_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]+.*-S[\s]+sethostname</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="Tests the for presence of sethostname" id="test_audit_rules_sethostname_el5" version="1">
    <ind:object object_ref="obj_audit_rules_sethostname_el5" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_audit_rules_sethostname_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]+.*-S[\s]+sethostname</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
