1 /* init.c - initialize passwd backend */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2004 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
12 * A copy of this license is available in the file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
21 #include <ac/socket.h>
24 #include "back-passwd.h"
26 ldap_pvt_thread_mutex_t passwd_mutex;
28 #ifdef SLAPD_PASSWD_DYNAMIC
30 int init_module(int argc, char *argv[]) {
33 memset( &bi, '\0', sizeof(bi) );
34 bi.bi_type = "passwd";
35 bi.bi_init = passwd_back_initialize;
41 #endif /* SLAPD_PASSWD_DYNAMIC */
44 passwd_back_initialize(
48 ldap_pvt_thread_mutex_init( &passwd_mutex );
53 bi->bi_destroy = passwd_back_destroy;
56 bi->bi_db_config = passwd_back_db_config;
59 bi->bi_db_destroy = 0;
63 bi->bi_op_search = passwd_back_search;
64 bi->bi_op_compare = 0;
69 bi->bi_op_abandon = 0;
73 bi->bi_chk_referrals = 0;
75 bi->bi_connection_init = 0;
76 bi->bi_connection_destroy = 0;
86 ldap_pvt_thread_mutex_destroy( &passwd_mutex );