]> git.sur5r.net Git - openldap/blob - servers/slapd/back-shell/init.c
Update of back-bdb2 to KDZ's new entry lock schema.
[openldap] / servers / slapd / back-shell / init.c
1 /* init.c - initialize shell backend */
2
3 #include "portable.h"
4
5 #include <stdio.h>
6
7 #include <ac/socket.h>
8
9 #include "slap.h"
10 #include "shell.h"
11
12 int
13 shell_back_initialize(
14     BackendInfo *bi
15 )
16 {
17         bi->bi_open = NULL;
18         bi->bi_config = NULL;
19         bi->bi_close = NULL;
20         bi->bi_destroy = NULL;
21
22         bi->bi_db_init = shell_back_db_init;
23         bi->bi_db_config = shell_back_db_config;
24         bi->bi_db_open = NULL;
25         bi->bi_db_close = NULL;
26         bi->bi_db_destroy = shell_back_db_destroy;
27
28         bi->bi_op_bind = shell_back_bind;
29         bi->bi_op_unbind = shell_back_unbind;
30         bi->bi_op_search = shell_back_search;
31         bi->bi_op_compare = shell_back_compare;
32         bi->bi_op_modify = shell_back_modify;
33         bi->bi_op_modrdn = shell_back_modrdn;
34         bi->bi_op_add = shell_back_add;
35         bi->bi_op_delete = shell_back_delete;
36         bi->bi_op_abandon = shell_back_abandon;
37
38         bi->bi_acl_group = NULL;
39
40         return 0;
41 }
42
43 int
44 shell_back_db_init(
45     Backend     *be
46 )
47 {
48         struct shellinfo        *si;
49
50         si = (struct shellinfo *) ch_calloc( 1, sizeof(struct shellinfo) );
51
52         be->be_private = si;
53
54         return si == NULL;
55 }
56
57 int
58 shell_back_db_destroy(
59     Backend     *be
60 )
61 {
62         free( be->be_private );
63         return 0;
64 }