<def-group>
  <definition class="compliance" id="file_permissions_extended_aliases_files" version="1">
    <metadata>
      <title>Files Referenced In /etc/aliases extended ACLs</title>
      <affected family="unix">
		<platform>CentOS 5</platform>
		<platform>Red Hat Enterprise Linux 5</platform>
      </affected>
      <description>File permissions for files referenced in /etc/aliases should not have extended ACLs.</description>
    </metadata>
    <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" />
      <criterion test_ref="test_file_permissions_extended_aliases_files" />
    </criteria>
  </definition>

  <unix:file_test check="all" check_existence="any_exist" comment="Testing files referenced in /etc/aliases extended ACLs" id="test_file_permissions_extended_aliases_files" version="1">
    <unix:object object_ref="object_file_permissions_extended_aliases_files" />
    <unix:state state_ref="state_file_permissions_extended_aliases_files" />
  </unix:file_test>
  <unix:file_object comment="List of files referenced in /etc/aliases" id="object_file_permissions_extended_aliases_files" version="1">
    <unix:filepath var_ref="var_file_permissions_extended_aliases_files_list" var_check="at least one" />
  </unix:file_object>
  <unix:file_state id="state_file_permissions_extended_aliases_files" version="1">
    <unix:has_extended_acl datatype="boolean">false</unix:has_extended_acl>
  </unix:file_state>

  <local_variable id="var_file_permissions_extended_aliases_files_list" comment="List of files referenced in /etc/aliases" datatype="string" version="1">
		<object_component item_field="subexpression" object_ref="object_file_permissions_extended_aliases_files_list" />
  </local_variable>
  <ind:textfilecontent54_object id="object_file_permissions_extended_aliases_files_list" version="1">
    <ind:filepath>/etc/aliases</ind:filepath>
    <ind:pattern operation="pattern match">^[^#].*\s(/.*)</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
