]> git.sur5r.net Git - openldap/blob - servers/slapd/back-passwd/init.c
Fix cursor initialization, scope IDs
[openldap] / servers / slapd / back-passwd / init.c
1 /* init.c - initialize passwd backend */
2 /* $OpenLDAP$ */
3
4 #include "portable.h"
5
6 #include <stdio.h>
7
8 #include <ac/socket.h>
9
10 #include "slap.h"
11 #include "back-passwd.h"
12
13 ldap_pvt_thread_mutex_t passwd_mutex;
14
15 #ifdef SLAPD_PASSWD_DYNAMIC
16
17 int back_passwd_LTX_init_module(int argc, char *argv[]) {
18     BackendInfo bi;
19
20     memset( &bi, '\0', sizeof(bi) );
21     bi.bi_type = "passwd";
22     bi.bi_init = passwd_back_initialize;
23
24     backend_add(&bi);
25     return 0;
26 }
27
28 #endif /* SLAPD_PASSWD_DYNAMIC */
29
30 int
31 passwd_back_initialize(
32     BackendInfo *bi
33 )
34 {
35         ldap_pvt_thread_mutex_init( &passwd_mutex );
36
37         bi->bi_open = 0;
38         bi->bi_config = 0;
39         bi->bi_close = 0;
40         bi->bi_destroy = passwd_back_destroy;
41
42         bi->bi_db_init = 0;
43         bi->bi_db_config = passwd_back_db_config;
44         bi->bi_db_open = 0;
45         bi->bi_db_close = 0;
46         bi->bi_db_destroy = 0;
47
48         bi->bi_op_bind = 0;
49         bi->bi_op_unbind = 0;
50         bi->bi_op_search = passwd_back_search;
51         bi->bi_op_compare = 0;
52         bi->bi_op_modify = 0;
53         bi->bi_op_modrdn = 0;
54         bi->bi_op_add = 0;
55         bi->bi_op_delete = 0;
56         bi->bi_op_abandon = 0;
57
58         bi->bi_extended = 0;
59
60         bi->bi_chk_referrals = 0;
61
62         bi->bi_connection_init = 0;
63         bi->bi_connection_destroy = 0;
64
65         return 0;
66 }
67
68 int
69 passwd_back_destroy(
70         BackendInfo *bi
71 )
72 {
73         ldap_pvt_thread_mutex_destroy( &passwd_mutex );
74         return 0;
75 }