Back to index

openldap  2.4.31
init.c
Go to the documentation of this file.
00001 /* init.c - initialize ldap backend */
00002 /* $OpenLDAP$ */
00003 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
00004  *
00005  * Copyright 2000-2012 The OpenLDAP Foundation.
00006  * Portions Copyright 2000-2003 Kurt D. Zeilenga.
00007  * All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted only as authorized by the OpenLDAP
00011  * Public License.
00012  *
00013  * A copy of this license is available in the file LICENSE in the
00014  * top-level directory of the distribution or, alternatively, at
00015  * <http://www.OpenLDAP.org/license.html>.
00016  */
00017 /* ACKNOWLEDGEMENTS:
00018  * This work was originally developed by Kurt D. Zeilenga for inclusion
00019  * in OpenLDAP Software.
00020  */
00021 
00022 #include "portable.h"
00023 
00024 #include <stdio.h>
00025 
00026 #include <ac/socket.h>
00027 #include <ac/param.h>
00028 #include <ac/string.h>
00029 
00030 #include "slap.h"
00031 #include "config.h"
00032 #include "proto-dnssrv.h"
00033 
00034 int
00035 dnssrv_back_initialize(
00036     BackendInfo      *bi )
00037 {
00038        static char *controls[] = {
00039               LDAP_CONTROL_MANAGEDSAIT,
00040               NULL
00041        };
00042 
00043        bi->bi_controls = controls;
00044 
00045        bi->bi_open = dnssrv_back_open;
00046        bi->bi_config = 0;
00047        bi->bi_close = 0;
00048        bi->bi_destroy = 0;
00049 
00050        bi->bi_db_init = 0;
00051        bi->bi_db_destroy = 0;
00052        bi->bi_db_config = 0 /* dnssrv_back_db_config */;
00053        bi->bi_db_open = 0;
00054        bi->bi_db_close = 0;
00055 
00056        bi->bi_chk_referrals = dnssrv_back_referrals;
00057 
00058        bi->bi_op_bind = dnssrv_back_bind;
00059        bi->bi_op_search = dnssrv_back_search;
00060        bi->bi_op_compare = 0 /* dnssrv_back_compare */;
00061        bi->bi_op_modify = 0;
00062        bi->bi_op_modrdn = 0;
00063        bi->bi_op_add = 0;
00064        bi->bi_op_delete = 0;
00065        bi->bi_op_abandon = 0;
00066        bi->bi_op_unbind = 0;
00067 
00068        bi->bi_extended = 0;
00069 
00070        bi->bi_connection_init = 0;
00071        bi->bi_connection_destroy = 0;
00072 
00073        bi->bi_access_allowed = slap_access_always_allowed;
00074 
00075        return 0;
00076 }
00077 
00078 AttributeDescription *ad_dc;
00079 AttributeDescription *ad_associatedDomain;
00080 
00081 int
00082 dnssrv_back_open(
00083     BackendInfo *bi )
00084 {
00085        const char *text;
00086 
00087        (void)slap_str2ad( "dc", &ad_dc, &text );
00088        (void)slap_str2ad( "associatedDomain", &ad_associatedDomain, &text );
00089 
00090        return 0;
00091 }
00092 
00093 int
00094 dnssrv_back_db_init(
00095        Backend       *be,
00096        ConfigReply *cr)
00097 {
00098        return 0;
00099 }
00100 
00101 int
00102 dnssrv_back_db_destroy(
00103        Backend       *be,
00104        ConfigReply *cr )
00105 {
00106        return 0;
00107 }
00108 
00109 #if SLAPD_DNSSRV == SLAPD_MOD_DYNAMIC
00110 
00111 /* conditionally define the init_module() function */
00112 SLAP_BACKEND_INIT_MODULE( dnssrv )
00113 
00114 #endif /* SLAPD_DNSSRV == SLAPD_MOD_DYNAMIC */
00115