<def-group>
  <definition class="compliance" id="file_owner_ldap_cacerts" version="1">
    <metadata>
      <title>LDAP TLS CA Cert File Owner</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>Owner for the LDAP TLS CA cert must be root.</description>
    </metadata>
    <criteria>
      <criterion test_ref="test_file_owner_ldap_cacerts" />
    </criteria>
  </definition>

  <local_variable id="var_file_owner_ldap_cacerts_list" comment="LDAP TLS CA cert" datatype="string" version="1">
		<object_component item_field="subexpression" object_ref="object_file_owner_ldap_cacerts_list" />
  </local_variable>
  <ind:textfilecontent54_object id="object_file_owner_ldap_cacerts_list" version="1">
    <ind:filepath>/etc/ldap.conf</ind:filepath>
    <ind:pattern operation="pattern match">^tls_cacert\s.*\s(/.*)$</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
  
  <unix:file_test check="all" check_existence="any_exist" comment="Testing LDAP TLS CA cert group owner" id="test_file_owner_ldap_cacerts" version="1">
    <unix:object object_ref="object_file_owner_ldap_cacerts" />
    <unix:state state_ref="state_file_owner_ldap_cacerts" />
  </unix:file_test>
  <unix:file_object comment="LDAP TLS CA cert" id="object_file_owner_ldap_cacerts" version="1">
    <unix:filepath var_ref="var_file_owner_ldap_cacerts_list" var_check="at least one" />
  </unix:file_object>
  <unix:file_state id="state_file_owner_ldap_cacerts" version="1">
    <unix:user_id datatype="int">0</unix:user_id>
  </unix:file_state>

</def-group>
