<def-group>
  <definition class="compliance" id="ldap_client_pam_ldap_present" version="1">
    <metadata>
      <title>Test for use of pam_ldap</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 6</platform>
      </affected>
      <description>Check for pam_ldap.so presence.</description>
      <reference source="MED" ref_id="20131120" ref_url="test_attestation" />
    </metadata>
    <criteria comment="package pam_ldap is present and used" operator="OR">
      <extend_definition comment="pam_ldap rpm installed? (note negation)"
      definition_ref="package_pam_ldap_removed" negate="true" />
      <criterion comment="look for pam_ldap.so"
      test_ref="test_ldap_client_pam_ldap_present" />
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" check_existence="at_least_one_exists"
  comment="Check if pam_ldap.so is uncommented in a file in pam.d"
  id="test_ldap_client_pam_ldap_present" version="1">
    <ind:object object_ref="obj_ldap_client_pam_ldap_present" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_ldap_client_pam_ldap_present"
  version="1">
    <ind:path>/etc/pam.d</ind:path>
    <ind:filename operation="pattern match">.*</ind:filename>
    <ind:pattern operation="pattern match">^[^#].*pam_ldap.so[\s]*.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
