## <http://www.OpenLDAP.org/license.html>.
SRCS = init.c config.c search.c bind.c unbind.c add.c compare.c \
- delete.c modify.c modrdn.c extended.c
+ delete.c modify.c modrdn.c extended.c chain.c
OBJS = init.lo config.lo search.lo bind.lo unbind.lo add.lo compare.lo \
- delete.lo modify.lo modrdn.lo extended.lo
+ delete.lo modify.lo modrdn.lo extended.lo chain.lo
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
#include "portable.h"
-#if defined(SLAPD_LDAP)
-
-#ifdef SLAPD_OVER_CHAIN
-
#include <stdio.h>
#include <ac/string.h>
#include <ac/socket.h>
#include "slap.h"
-#include "../back-ldap/back-ldap.h"
+#include "back-ldap.h"
static BackendInfo *lback;
}
static int
-ldap_chain_config(
+ldap_chain_db_config(
BackendDB *be,
const char *fname,
int lineno,
}
static int
-ldap_chain_init(
+ldap_chain_db_init(
BackendDB *be
)
{
void *private = be->be_private;
int rc;
+ if ( lback == NULL ) {
+ lback = backend_info( "ldap" );
+
+ if ( lback == NULL ) {
+ return -1;
+ }
+ }
+
be->be_private = NULL;
rc = lback->bi_db_init( be );
on->on_bi.bi_private = be->be_private;
}
static int
-ldap_chain_destroy(
+ldap_chain_db_destroy(
BackendDB *be
)
{
static slap_overinst ldapchain;
int
-chain_init()
+chain_init( void )
{
- lback = backend_info( "ldap" );
-
- if ( !lback ) {
- return -1;
- }
-
ldapchain.on_bi.bi_type = "chain";
- ldapchain.on_bi.bi_db_init = ldap_chain_init;
- ldapchain.on_bi.bi_db_config = ldap_chain_config;
- ldapchain.on_bi.bi_db_destroy = ldap_chain_destroy;
+ ldapchain.on_bi.bi_db_init = ldap_chain_db_init;
+ ldapchain.on_bi.bi_db_config = ldap_chain_db_config;
+ ldapchain.on_bi.bi_db_destroy = ldap_chain_db_destroy;
/* ... otherwise the underlying backend's function would be called,
* likely passing an invalid entry; on the contrary, the requested
return overlay_register( &ldapchain );
}
-#if SLAPD_OVER_CHAIN == SLAPD_MOD_DYNAMIC
-int init_module(int argc, char *argv[]) {
- return chain_init();
-}
-#endif /* SLAPD_OVER_CHAIN == SLAPD_MOD_DYNAMIC */
-
-#endif /* SLAPD_OVER_CHAIN */
-
-#endif /* ! defined(SLAPD_LDAP) */
## <http://www.OpenLDAP.org/license.html>.
SRCS = overlays.c \
- chain.c \
denyop.c \
dyngroup.c \
glue.c \
syncprov.c \
unique.c
OBJS = overlays.lo \
- chain.lo \
denyop.lo \
dyngroup.lo \
glue.lo \
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = $(MODULES_CPPFLAGS)
-chain.la : chain.lo $(@PLAT@_LINK_LIBS)
- $(LTLINK_MOD) -module -o $@ chain.lo version.lo $(LINK_LIBS)
-
denyop.la : denyop.lo $(@PLAT@_LINK_LIBS)
$(LTLINK_MOD) -module -o $@ denyop.lo version.lo $(LINK_LIBS)
#include "slap.h"
-#if SLAPD_OVER_CHAIN == SLAPD_MOD_STATIC
-extern int chain_init();
-#endif
#if SLAPD_OVER_DENYOP == SLAPD_MOD_STATIC
extern int denyop_init();
#endif
char *name;
int (*func)();
} funcs[] = {
-#if SLAPD_OVER_CHAIN == SLAPD_MOD_STATIC
- { "LDAP Chain Response", chain_init },
-#endif
#if SLAPD_OVER_DENYOP == SLAPD_MOD_STATIC
{ "Deny Operation", denyop_init },
#endif