<def-group>
  <definition class="compliance" id="accounts_password_pam_retry" version="1">
    <metadata>
      <title>Set Password retry Requirements</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 6</platform>
      </affected>
      <description>The password retry should meet minimum
      requirements</description>
      <reference source="swells" ref_id="20140925" ref_url="test_attestation"/>
    </metadata>
    <criteria>
      <criterion comment="rhel6 pam_cracklib" test_ref="test_password_pam_cracklib_retry" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" comment="check the configuration of /etc/pam.d/system-auth" id="test_password_pam_cracklib_retry" version="1">
    <ind:object object_ref="obj_password_pam_cracklib_retry" />
    <ind:state state_ref="state_password_pam_cracklib_retry" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="obj_password_pam_cracklib_retry" version="1">
    <ind:filepath>/etc/pam.d/system-auth</ind:filepath>
    <ind:pattern operation="pattern match">^\s*password\s+(?:(?:required)|(?:requisite))\s+pam_cracklib\.so.*retry=([0-9]*).*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_password_pam_cracklib_retry" version="1">
    <ind:subexpression datatype="int" operation="less than or equal" var_ref="var_password_pam_retry" />
  </ind:textfilecontent54_state>

  <external_variable comment="External variable for pam_cracklib retry" datatype="int" id="var_password_pam_retry" version="1" />
</def-group>
