<def-group>
  <definition class="compliance" id="accounts_password_pam_unix_remember" version="1">
    <metadata>
      <title>Limit Password Reuse</title>
      <affected family="unix">
        <platform>multi_platform_rhel</platform>
        <platform>multi_platform_fedora</platform>
      </affected>
      <description>The passwords to remember should be set correctly.</description>
      <reference source="SDW" ref_id="20131025" ref_url="test_attestation" />
      <reference source="JL" ref_id="FEDORA20_20150522" ref_url="test_attestation" />
    </metadata>
    <criteria>
      <criterion comment="remember parameter is set to 0" test_ref="test_accounts_password_pam_unix_remember" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="remember is set in /etc/pam.d/system-auth" id="test_accounts_password_pam_unix_remember" version="1">
    <ind:object object_ref="object_accounts_password_pam_unix_remember" />
    <ind:state state_ref="state_accounts_password_pam_unix_remember" />
  </ind:textfilecontent54_test>

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

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

  <external_variable comment="number of passwords that should be remembered" datatype="int" id="var_password_pam_unix_remember" version="1" />
</def-group>
