Pass a threadsafe ctx into fr_connection_pool create callback
[freeradius.git] / src / modules / rlm_ldap / ldap.h
index 23d483d..50bcb87 100644 (file)
 #  define LDAP_OPT_RESULT_CODE LDAP_OPT_ERROR_NUMBER
 #endif
 
+#ifndef LDAP_CONST
+#  define LDAP_CONST
+#endif
+
 #define LDAP_MAX_ATTRMAP               128             //!< Maximum number of mappings between LDAP and
                                                        //!< FreeRADIUS attributes.
 #define LDAP_MAP_RESERVED              4               //!< Number of additional items to allocate in expanded
@@ -68,6 +72,9 @@ typedef struct ldap_instance {
                                                        //!< directory.
        char const      *password;                      //!< Password used in administrative bind.
 
+       char const      *dereference_str;               //!< When to dereference (never, searching, finding, always)
+       int             dereference;                    //!< libldap value specifying dereferencing behaviour.
+
        bool            chase_referrals;                //!< If the LDAP server returns a referral to another server
                                                        //!< or point in the tree, follow it, establishing new
                                                        //!< connections and binding where necessary.
@@ -339,9 +346,7 @@ void rlm_ldap_check_reply(ldap_instance_t const *inst, REQUEST *request);
 /*
  *     ldap.c - Callbacks for the connection pool API.
  */
-void *mod_conn_create(void *ctx);
-
-int mod_conn_delete(UNUSED void *instance, void *handle);
+void *mod_conn_create(TALLOC_CTX *ctx, void *instance);
 
 ldap_handle_t *rlm_ldap_get_socket(ldap_instance_t const *inst, REQUEST *request);