<def-group>
  <definition class="compliance" id="accounts_password_pam_cracklib_lcredit" version="1">
    <metadata>
      <title>Set Password lcredit Requirements</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 lcredit should meet minimum requirements using pam_cracklib</description>
    </metadata>
    <criteria>
      <criterion comment="Conditions for lcredit are satisfied" test_ref="test_password_pam_cracklib_lcredit" />
      <extend_definition comment="global account settings configured" definition_ref="accounts_global_setting" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" comment="check the configuration of /etc/pam.d/system-auth" id="test_password_pam_cracklib_lcredit" version="1">
    <ind:object object_ref="obj_password_pam_cracklib_lcredit" />
    <ind:state state_ref="state_password_pam_cracklib_lcredit" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_password_pam_cracklib_lcredit" version="1">
    <ind:path>/etc/pam.d</ind:path>
    <ind:filename>system-auth</ind:filename>
    <ind:pattern operation="pattern match">^password[\s]+(?:requisite|required)[\s]+(?:/lib/security/(?:\$ISA/)*)*pam_cracklib.so[\w_\.\-=\s]*[\s]+lcredit=(-?\d+)(?:[\s]|$)</ind:pattern>
    <ind:instance datatype="int" operation="less than or equal">1</ind:instance>
  </ind:textfilecontent54_object>
  <ind:textfilecontent54_state id="state_password_pam_cracklib_lcredit" version="1">
    <ind:instance datatype="int">1</ind:instance>
    <ind:subexpression datatype="int" operation="less than or equal" var_ref="var_password_pam_cracklib_lcredit" />
  </ind:textfilecontent54_state>

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

</def-group>
