<def-group>
  <definition class="compliance" id="ldap_client_tls_cacertpath" version="1">
    <metadata>
      <title>Configure LDAP CA Certificate Path</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 6</platform>
      </affected>
      <description>Require the use of TLS for ldap clients.</description>
      <reference source="MED" ref_id="20131120" ref_url="test_attestation" />
    </metadata>
    <criteria comment="package pam_ldap is not present" operator="OR">
      <extend_definition comment="pam_ldap not present or in use"
      definition_ref="ldap_client_pam_ldap_present" negate="true" />
      <criterion comment="look for tls_cacertdir in /etc/pam_ldap.conf"
      test_ref="test_ldap_client_tls_cacertdir" />
      <criterion comment="look for tls_cacertfile in /etc/pam_ldap.conf"
      test_ref="test_ldap_client_tls_cacertfile" />
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" check_existence="at_least_one_exists"
  comment="Tests the value of the tls_cacertdir setting in the /etc/pam_ldap.conf file"
  id="test_ldap_client_tls_cacertdir" version="1">
    <ind:object object_ref="obj_ldap_client_tls_cacertdir" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_ldap_client_tls_cacertdir" version="1">
    <ind:filepath>/etc/pam_ldap.conf</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*tls_cacertdir[\s]+(.*)$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
  <ind:textfilecontent54_test check="all" check_existence="at_least_one_exists"
  comment="Tests the value of the tls_cacertfile setting in the /etc/pam_ldap.conf file"
  id="test_ldap_client_tls_cacertfile" version="1">
    <ind:object object_ref="obj_ldap_client_tls_cacertfile" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_ldap_client_tls_cacertfile"
  version="1">
    <ind:filepath>/etc/pam_ldap.conf</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*tls_cacertfile[\s]+(.*)$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
