]> git.sur5r.net Git - openldap/blob - servers/slapd/back-shell/init.c
function pointers are incompatible with `void *'; remove NULL or replace with 0
[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 = 0;
18         bi->bi_config = 0;
19         bi->bi_close = 0;
20         bi->bi_destroy = 0;
21
22         bi->bi_db_init = shell_back_db_init;
23         bi->bi_db_config = shell_back_db_config;
24         bi->bi_db_open = 0;
25         bi->bi_db_close = 0;
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 #ifdef SLAPD_ACLGROUPS
39         bi->bi_acl_group = 0;
40 #endif
41
42         return 0;
43 }
44
45 int
46 shell_back_db_init(
47     Backend     *be
48 )
49 {
50         struct shellinfo        *si;
51
52         si = (struct shellinfo *) ch_calloc( 1, sizeof(struct shellinfo) );
53
54         be->be_private = si;
55
56         return si == NULL;
57 }
58
59 int
60 shell_back_db_destroy(
61     Backend     *be
62 )
63 {
64         free( be->be_private );
65         return 0;
66 }