<def-group>
  <definition class="compliance" id="set_password_hashing_algorithm_systemauth" version="1">
    <metadata>
      <title>Set Password Hashing Algorithm in /etc/pam.d/system-auth</title>
      <affected family="unix">
        <platform>multi_platform_rhel</platform>
      </affected>
      <description>The password hashing algorithm should be set correctly in /etc/pam.d/system-auth.</description>
      <reference source="MED" ref_id="20130819" ref_url="test_attestation" />
    </metadata>
    <criteria operator="AND">
      <criterion test_ref="test_pam_unix_sha512" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="at_least_one_exists" comment="check /etc/pam.d/system-auth for correct settings" id="test_pam_unix_sha512" version="1">
    <ind:object object_ref="object_pam_unix_sha512" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object comment="check /etc/pam.d/system-auth for correct settings" id="object_pam_unix_sha512" version="1">
    <ind:filepath>/etc/pam.d/system-auth</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*password[\s]+(?:(?:required)|(?:sufficient))[\s]+pam_unix\.so[\s]+.*sha512.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
