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

  <ind:textfilecontent54_test check="all" check_existence="at_least_one_exists" 
  comment="The password hashing algorithm should be set correctly in /etc/libuser.conf" 
  id="test_etc_libuser_conf_cryptstyle" version="1">
    <ind:object object_ref="object_etc_libuser_conf_cryptstyle" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object comment="The password hashing algorithm should be set correctly in /etc/libuser.conf"
  id="object_etc_libuser_conf_cryptstyle" version="1">
    <ind:filepath>/etc/libuser.conf</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*crypt_style[\s]+=[\s]+(?i)sha512[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
