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

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

  <ind:textfilecontent54_object id="object_password_pam_cracklib_minclass"
  version="1">
    <ind:filepath>/etc/pam.d/system-auth</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*password[\s]+(?:(?:required)|(?:requisite))[\s]+[\w_\.\-=\s]+[\s]minclass=(\d+)(?:[\s]|$)</ind:pattern>
    <ind:instance datatype="int"
    operation="greater than or equal">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_password_pam_cracklib_minclass"
  version="1">
    <ind:instance datatype="int">1</ind:instance>
    <ind:subexpression datatype="int" operation="greater than or equal"
    var_ref="var_password_pam_minclass" />
  </ind:textfilecontent54_state>

  <external_variable comment="External variable for pam_cracklib minclass"
  datatype="int" id="var_password_pam_minclass" version="1" />

</def-group>
