<def-group>
  <definition class="compliance" id="set_password_hashing_algorithm_systemauth" version="1">
    <metadata>
      <title>Set Password Hashing Algorithm</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>The password hashing algorithm should be set correctly in /etc/pam.d/system-auth and /etc/pam.d/system-auth-ac.</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" />
      <criteria>
        <criterion test_ref="test_set_password_hashing_algorithm_systemauth" />
        <criterion test_ref="test_set_password_hashing_algorithm_systemauthac" />
      </criteria>
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="check /etc/pam.d/system-auth for correct settings" id="test_set_password_hashing_algorithm_systemauth" version="1">
    <ind:object object_ref="object_set_password_hashing_algorithm_systemauth" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object comment="check /etc/pam.d/system-auth for correct settings" id="object_set_password_hashing_algorithm_systemauth" version="1">
    <ind:filepath>/etc/pam.d/system-auth</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*password[\s]+.*[\s]+pam_unix\.so[\s]+.*sha512.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="check /etc/pam.d/system-auth-ac for correct settings" id="test_set_password_hashing_algorithm_systemauthac" version="1">
    <ind:object object_ref="object_set_password_hashing_algorithm_systemauthac" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object comment="check /etc/pam.d/system-auth-ac for correct settings" id="object_set_password_hashing_algorithm_systemauthac" version="1">
    <ind:filepath>/etc/pam.d/system-auth-ac</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*password[\s]+.*[\s]+pam_unix\.so[\s]+.*sha512.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
