1 /* init.c - initialize ldap backend */
4 * Copyright 1999, Howard Chu, All rights reserved. <hyc@highlandsun.com>
6 * Permission is granted to anyone to use this software for any purpose
7 * on any computer system, and to alter it and redistribute it, subject
8 * to the following restrictions:
10 * 1. The author is not responsible for the consequences of use of this
11 * software, no matter how awful, even if they arise from flaws in it.
13 * 2. The origin of this software must not be misrepresented, either by
14 * explicit claim or by omission. Since few users ever read sources,
15 * credits should appear in the documentation.
17 * 3. Altered versions must be plainly marked as such, and must not be
18 * misrepresented as being the original software. Since few users
19 * ever read sources, credits should appear in the documentation.
21 * 4. This notice may not be removed or altered.
28 #include <ac/socket.h>
31 #include "back-ldap.h"
33 #ifdef SLAPD_LDAP_DYNAMIC
36 G_MODULE_EXPORT void init_module(int argc, char *argv[]) {
40 bi.bi_init = ldap_back_initialize;
45 #endif /* SLAPD_LDAP_DYNAMIC */
57 bi->bi_db_init = ldap_back_db_init;
58 bi->bi_db_config = ldap_back_db_config;
61 bi->bi_db_destroy = ldap_back_db_destroy;
63 bi->bi_op_bind = ldap_back_bind;
65 bi->bi_op_search = ldap_back_search;
66 bi->bi_op_compare = ldap_back_compare;
67 bi->bi_op_modify = ldap_back_modify;
68 bi->bi_op_modrdn = ldap_back_modrdn;
69 bi->bi_op_add = ldap_back_add;
70 bi->bi_op_delete = ldap_back_delete;
71 bi->bi_op_abandon = 0;
75 bi->bi_connection_init = 0;
76 bi->bi_connection_destroy = ldap_back_conn_destroy;
88 li = (struct ldapinfo *) ch_calloc( 1, sizeof(struct ldapinfo) );
89 ldap_pvt_thread_mutex_init( &li->conn_mutex );
103 if (be->be_private) {
104 li = (struct ldapinfo *)be->be_private;
109 ldap_pvt_thread_mutex_destroy( &li->conn_mutex );
112 free( be->be_private );