mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
rework static backend initialization
This commit is contained in:
parent
be32dce97f
commit
79f744f30b
39 changed files with 470 additions and 272 deletions
60
configure.in
60
configure.in
|
|
@ -2886,6 +2886,66 @@ else
|
|||
SLAPD_NO_STATIC=
|
||||
fi
|
||||
|
||||
dnl Generate static backend header file
|
||||
BACKEND_HEADER=servers/slapd/backend.h
|
||||
cat > $BACKEND_HEADER << EOF
|
||||
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
*
|
||||
* Copyright 1998-2004 The OpenLDAP Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted only as authorized by the OpenLDAP
|
||||
* Public License.
|
||||
*
|
||||
* A copy of this license is available in the file LICENSE in the
|
||||
* top-level directory of the distribution or, alternatively, at
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
/* Portions Copyright (c) 1995 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that this notice is preserved and that due credit is given
|
||||
* to the University of Michigan at Ann Arbor. The name of the University
|
||||
* may not be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission. This software
|
||||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
/* this file is automatically generated by configure; do not edit */
|
||||
|
||||
EOF
|
||||
|
||||
for b in $SLAPD_STATIC_BACKENDS; do
|
||||
bb=`echo "$b" | sed -e 's;back-;;'`
|
||||
|
||||
cat >> $BACKEND_HEADER << EOF
|
||||
extern BI_init ${bb}_back_initialize;
|
||||
EOF
|
||||
done
|
||||
|
||||
cat >> $BACKEND_HEADER << EOF
|
||||
|
||||
static BackendInfo binfo[[]] = {
|
||||
EOF
|
||||
|
||||
for b in $SLAPD_STATIC_BACKENDS; do
|
||||
bb=`echo "$b" | sed -e 's;back-;;'`
|
||||
|
||||
cat >> $BACKEND_HEADER << EOF
|
||||
{ "$bb", ${bb}_back_initialize },
|
||||
|
||||
EOF
|
||||
done
|
||||
|
||||
cat >> $BACKEND_HEADER << EOF
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
/* end of generated file */
|
||||
EOF
|
||||
dnl done generating static backend header file
|
||||
|
||||
AC_SUBST(LIBSRCS)
|
||||
AC_SUBST(PLAT)
|
||||
AC_SUBST(WITH_SASL)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define BDB_HIER
|
||||
#endif
|
||||
|
||||
extern BI_init hdb_initialize;
|
||||
extern BI_init hdb_back_initialize;
|
||||
|
||||
#include "../back-bdb/external.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef SLAPD_LDAP_H
|
||||
#define SLAPD_LDAP_H
|
||||
|
||||
#include "external.h"
|
||||
#include "proto-ldap.h"
|
||||
|
||||
/* String rewrite library */
|
||||
#ifdef ENABLE_REWRITE
|
||||
|
|
|
|||
|
|
@ -24,37 +24,6 @@
|
|||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_init ldap_back_initialize;
|
||||
extern BI_open ldap_back_open;
|
||||
extern BI_close ldap_back_close;
|
||||
extern BI_destroy ldap_back_destroy;
|
||||
|
||||
extern BI_db_init ldap_back_db_init;
|
||||
extern BI_db_open ldap_back_db_open;
|
||||
extern BI_db_destroy ldap_back_db_destroy;
|
||||
|
||||
extern BI_db_config ldap_back_db_config;
|
||||
|
||||
extern BI_op_bind ldap_back_bind;
|
||||
|
||||
extern BI_connection_destroy ldap_back_conn_destroy;
|
||||
|
||||
extern BI_op_search ldap_back_search;
|
||||
|
||||
extern BI_op_compare ldap_back_compare;
|
||||
|
||||
extern BI_op_modify ldap_back_modify;
|
||||
|
||||
extern BI_op_modrdn ldap_back_modrdn;
|
||||
|
||||
extern BI_op_add ldap_back_add;
|
||||
|
||||
extern BI_op_delete ldap_back_delete;
|
||||
|
||||
extern BI_op_abandon ldap_back_abandon;
|
||||
|
||||
extern BI_op_extended ldap_back_extended;
|
||||
|
||||
extern BI_entry_get_rw ldap_back_entry_get;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "slap.h"
|
||||
#include "back-ldap.h"
|
||||
#include "external.h"
|
||||
|
||||
#if SLAPD_LDAP == SLAPD_MOD_DYNAMIC
|
||||
|
||||
|
|
|
|||
51
servers/slapd/back-ldap/proto-ldap.h
Normal file
51
servers/slapd/back-ldap/proto-ldap.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/* $OpenLDAP$ */
|
||||
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
*
|
||||
* Copyright 2003-2004 The OpenLDAP Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted only as authorized by the OpenLDAP
|
||||
* Public License.
|
||||
*
|
||||
* A copy of this license is available in the file LICENSE in the
|
||||
* top-level directory of the distribution or, alternatively, at
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
/* ACKNOWLEDGEMENTS:
|
||||
* This work was initially developed by the Howard Chu for inclusion
|
||||
* in OpenLDAP Software and subsequently enhanced by Pierangelo
|
||||
* Masarati.
|
||||
*/
|
||||
|
||||
#ifndef _LDAP_EXTERNAL_H
|
||||
#define _LDAP_EXTERNAL_H
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_open ldap_back_open;
|
||||
extern BI_close ldap_back_close;
|
||||
extern BI_destroy ldap_back_destroy;
|
||||
|
||||
extern BI_db_init ldap_back_db_init;
|
||||
extern BI_db_open ldap_back_db_open;
|
||||
extern BI_db_destroy ldap_back_db_destroy;
|
||||
extern BI_db_config ldap_back_db_config;
|
||||
|
||||
extern BI_op_bind ldap_back_bind;
|
||||
extern BI_op_search ldap_back_search;
|
||||
extern BI_op_compare ldap_back_compare;
|
||||
extern BI_op_modify ldap_back_modify;
|
||||
extern BI_op_modrdn ldap_back_modrdn;
|
||||
extern BI_op_add ldap_back_add;
|
||||
extern BI_op_delete ldap_back_delete;
|
||||
extern BI_op_abandon ldap_back_abandon;
|
||||
extern BI_op_extended ldap_back_extended;
|
||||
|
||||
extern BI_connection_destroy ldap_back_conn_destroy;
|
||||
|
||||
extern BI_entry_get_rw ldap_back_entry_get;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* _LDAP_EXTERNAL_H */
|
||||
|
|
@ -19,49 +19,6 @@
|
|||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_init ldbm_back_initialize;
|
||||
extern BI_open ldbm_back_open;
|
||||
extern BI_close ldbm_back_close;
|
||||
extern BI_destroy ldbm_back_destroy;
|
||||
|
||||
extern BI_db_init ldbm_back_db_init;
|
||||
extern BI_db_open ldbm_back_db_open;
|
||||
extern BI_db_close ldbm_back_db_close;
|
||||
extern BI_db_destroy ldbm_back_db_destroy;
|
||||
|
||||
extern BI_db_config ldbm_back_db_config;
|
||||
|
||||
extern BI_op_extended ldbm_back_extended;
|
||||
|
||||
extern BI_op_bind ldbm_back_bind;
|
||||
|
||||
extern BI_op_search ldbm_back_search;
|
||||
|
||||
extern BI_op_compare ldbm_back_compare;
|
||||
|
||||
extern BI_op_modify ldbm_back_modify;
|
||||
|
||||
extern BI_op_modrdn ldbm_back_modrdn;
|
||||
|
||||
extern BI_op_add ldbm_back_add;
|
||||
|
||||
extern BI_op_delete ldbm_back_delete;
|
||||
|
||||
extern BI_operational ldbm_back_operational;
|
||||
|
||||
extern BI_has_subordinates ldbm_back_hasSubordinates;
|
||||
|
||||
/* hooks for slap tools */
|
||||
extern BI_tool_entry_open ldbm_tool_entry_open;
|
||||
extern BI_tool_entry_close ldbm_tool_entry_close;
|
||||
extern BI_tool_entry_first ldbm_tool_entry_first;
|
||||
extern BI_tool_entry_next ldbm_tool_entry_next;
|
||||
extern BI_tool_entry_get ldbm_tool_entry_get;
|
||||
extern BI_tool_entry_put ldbm_tool_entry_put;
|
||||
|
||||
extern BI_tool_entry_reindex ldbm_tool_entry_reindex;
|
||||
extern BI_tool_sync ldbm_tool_sync;
|
||||
|
||||
extern BI_chk_referrals ldbm_back_referrals;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "slap.h"
|
||||
#include "back-ldbm.h"
|
||||
#include "external.h"
|
||||
|
||||
#if SLAPD_LDBM == SLAPD_MOD_DYNAMIC
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
|
||||
#include <ldap_cdefs.h>
|
||||
|
||||
#include "external.h"
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
/*
|
||||
|
|
@ -219,5 +217,45 @@ int next_id LDAP_P(( Backend *be, ID *idp ));
|
|||
int next_id_get LDAP_P(( Backend *be, ID *idp ));
|
||||
int next_id_write LDAP_P(( Backend *be, ID id ));
|
||||
|
||||
/*
|
||||
* former external.h
|
||||
*/
|
||||
|
||||
extern BI_open ldbm_back_open;
|
||||
extern BI_close ldbm_back_close;
|
||||
extern BI_destroy ldbm_back_destroy;
|
||||
|
||||
extern BI_db_init ldbm_back_db_init;
|
||||
extern BI_db_open ldbm_back_db_open;
|
||||
extern BI_db_close ldbm_back_db_close;
|
||||
extern BI_db_destroy ldbm_back_db_destroy;
|
||||
extern BI_db_config ldbm_back_db_config;
|
||||
|
||||
extern BI_op_extended ldbm_back_extended;
|
||||
extern BI_op_bind ldbm_back_bind;
|
||||
extern BI_op_search ldbm_back_search;
|
||||
extern BI_op_compare ldbm_back_compare;
|
||||
extern BI_op_modify ldbm_back_modify;
|
||||
extern BI_op_modrdn ldbm_back_modrdn;
|
||||
extern BI_op_add ldbm_back_add;
|
||||
extern BI_op_delete ldbm_back_delete;
|
||||
|
||||
extern BI_operational ldbm_back_operational;
|
||||
extern BI_has_subordinates ldbm_back_hasSubordinates;
|
||||
|
||||
/* hooks for slap tools */
|
||||
extern BI_tool_entry_open ldbm_tool_entry_open;
|
||||
extern BI_tool_entry_close ldbm_tool_entry_close;
|
||||
extern BI_tool_entry_first ldbm_tool_entry_first;
|
||||
extern BI_tool_entry_next ldbm_tool_entry_next;
|
||||
extern BI_tool_entry_get ldbm_tool_entry_get;
|
||||
extern BI_tool_entry_put ldbm_tool_entry_put;
|
||||
|
||||
extern BI_tool_entry_reindex ldbm_tool_entry_reindex;
|
||||
extern BI_tool_sync ldbm_tool_sync;
|
||||
|
||||
extern BI_chk_referrals ldbm_back_referrals;
|
||||
|
||||
LDAP_END_DECL
|
||||
#endif
|
||||
|
||||
#endif /* _PROTO_BACK_LDBM */
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#ifndef SLAPD_META_H
|
||||
#define SLAPD_META_H
|
||||
|
||||
#include "external.h"
|
||||
#include "proto-meta.h"
|
||||
|
||||
/* String rewrite library */
|
||||
#include "rewrite.h"
|
||||
|
|
|
|||
|
|
@ -26,23 +26,6 @@
|
|||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_init meta_back_initialize;
|
||||
extern BI_open meta_back_open;
|
||||
extern BI_close meta_back_close;
|
||||
extern BI_destroy meta_back_destroy;
|
||||
|
||||
extern BI_db_init meta_back_db_init;
|
||||
extern BI_db_destroy meta_back_db_destroy;
|
||||
extern BI_db_config meta_back_db_config;
|
||||
|
||||
extern BI_op_bind meta_back_bind;
|
||||
extern BI_connection_destroy meta_back_conn_destroy;
|
||||
extern BI_op_search meta_back_search;
|
||||
extern BI_op_compare meta_back_compare;
|
||||
extern BI_op_modify meta_back_modify;
|
||||
extern BI_op_modrdn meta_back_modrdn;
|
||||
extern BI_op_add meta_back_add;
|
||||
extern BI_op_delete meta_back_delete;
|
||||
extern BI_op_abandon meta_back_abandon;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include "slap.h"
|
||||
#include "../back-ldap/back-ldap.h"
|
||||
#include "back-meta.h"
|
||||
#include "external.h"
|
||||
|
||||
#if SLAPD_META == SLAPD_MOD_DYNAMIC
|
||||
|
||||
|
|
|
|||
49
servers/slapd/back-meta/proto-meta.h
Normal file
49
servers/slapd/back-meta/proto-meta.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/* $OpenLDAP$ */
|
||||
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
*
|
||||
* Copyright 1999-2004 The OpenLDAP Foundation.
|
||||
* Portions Copyright 2001-2003 Pierangelo Masarati.
|
||||
* Portions Copyright 1999-2003 Howard Chu.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted only as authorized by the OpenLDAP
|
||||
* Public License.
|
||||
*
|
||||
* A copy of this license is available in the file LICENSE in the
|
||||
* top-level directory of the distribution or, alternatively, at
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
/* ACKNOWLEDGEMENTS:
|
||||
* This work was initially developed by the Howard Chu for inclusion
|
||||
* in OpenLDAP Software and subsequently enhanced by Pierangelo
|
||||
* Masarati.
|
||||
*/
|
||||
|
||||
#ifndef PROTO_META_H
|
||||
#define PROTO_META_H
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_open meta_back_open;
|
||||
extern BI_close meta_back_close;
|
||||
extern BI_destroy meta_back_destroy;
|
||||
|
||||
extern BI_db_init meta_back_db_init;
|
||||
extern BI_db_destroy meta_back_db_destroy;
|
||||
extern BI_db_config meta_back_db_config;
|
||||
|
||||
extern BI_op_bind meta_back_bind;
|
||||
extern BI_op_search meta_back_search;
|
||||
extern BI_op_compare meta_back_compare;
|
||||
extern BI_op_modify meta_back_modify;
|
||||
extern BI_op_modrdn meta_back_modrdn;
|
||||
extern BI_op_add meta_back_add;
|
||||
extern BI_op_delete meta_back_delete;
|
||||
extern BI_op_abandon meta_back_abandon;
|
||||
|
||||
extern BI_connection_destroy meta_back_conn_destroy;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* PROTO_META_H */
|
||||
|
|
@ -24,18 +24,6 @@
|
|||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_init monitor_back_initialize;
|
||||
extern BI_db_init monitor_back_db_init;
|
||||
extern BI_db_open monitor_back_db_open;
|
||||
extern BI_config monitor_back_config;
|
||||
extern BI_db_config monitor_back_db_config;
|
||||
|
||||
extern BI_db_destroy monitor_back_db_destroy;
|
||||
|
||||
extern BI_op_search monitor_back_search;
|
||||
extern BI_op_compare monitor_back_compare;
|
||||
extern BI_op_modify monitor_back_modify;
|
||||
extern BI_op_bind monitor_back_bind;
|
||||
extern BI_operational monitor_back_operational;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#include <ldap_cdefs.h>
|
||||
|
||||
#include "external.h"
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
/*
|
||||
|
|
@ -172,6 +170,22 @@ int monitor_subsys_rww_update LDAP_P(( Operation *op, Entry *e ));
|
|||
} while ( 0 )
|
||||
#endif /* ! HAVE_GMP */
|
||||
|
||||
/*
|
||||
* former external.h
|
||||
*/
|
||||
|
||||
extern BI_db_init monitor_back_db_init;
|
||||
extern BI_db_open monitor_back_db_open;
|
||||
extern BI_config monitor_back_config;
|
||||
extern BI_db_destroy monitor_back_db_destroy;
|
||||
extern BI_db_config monitor_back_db_config;
|
||||
|
||||
extern BI_op_search monitor_back_search;
|
||||
extern BI_op_compare monitor_back_compare;
|
||||
extern BI_op_modify monitor_back_modify;
|
||||
extern BI_op_bind monitor_back_bind;
|
||||
extern BI_operational monitor_back_operational;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* _PROTO_BACK_MONITOR */
|
||||
|
|
|
|||
|
|
@ -24,25 +24,6 @@ LDAP_BEGIN_DECL
|
|||
|
||||
extern BI_init null_back_initialize;
|
||||
|
||||
extern BI_db_init null_back_db_init;
|
||||
extern BI_db_destroy null_back_db_destroy;
|
||||
|
||||
extern BI_db_config null_back_db_config;
|
||||
|
||||
extern BI_op_bind null_back_bind;
|
||||
|
||||
extern BI_op_search null_back_search;
|
||||
|
||||
extern BI_op_compare null_back_compare;
|
||||
|
||||
extern BI_op_modify null_back_modify;
|
||||
|
||||
extern BI_op_modrdn null_back_modrdn;
|
||||
|
||||
extern BI_op_add null_back_add;
|
||||
|
||||
extern BI_op_delete null_back_delete;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* _NULL_EXTERNAL_H */
|
||||
|
|
|
|||
|
|
@ -26,6 +26,22 @@
|
|||
#include "slap.h"
|
||||
#include "external.h"
|
||||
|
||||
/*
|
||||
* former external.h
|
||||
*/
|
||||
|
||||
extern BI_db_init null_back_db_init;
|
||||
extern BI_db_destroy null_back_db_destroy;
|
||||
extern BI_db_config null_back_db_config;
|
||||
|
||||
extern BI_op_bind null_back_bind;
|
||||
extern BI_op_search null_back_search;
|
||||
extern BI_op_compare null_back_compare;
|
||||
extern BI_op_modify null_back_modify;
|
||||
extern BI_op_modrdn null_back_modrdn;
|
||||
extern BI_op_add null_back_add;
|
||||
extern BI_op_delete null_back_delete;
|
||||
|
||||
struct null_info {
|
||||
int bind_allowed;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,12 +16,18 @@
|
|||
#ifndef _BACK_PASSWD_H
|
||||
#define _BACK_PASSWD_H
|
||||
|
||||
#include "external.h"
|
||||
#include "proto-passwd.h"
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
extern ldap_pvt_thread_mutex_t passwd_mutex;
|
||||
|
||||
extern BI_destroy passwd_back_destroy;
|
||||
|
||||
extern BI_db_config passwd_back_db_config;
|
||||
|
||||
extern BI_op_search passwd_back_search;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* _BACK_PASSWD_H */
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#include <ac/time.h>
|
||||
|
||||
#include "slap.h"
|
||||
#include "external.h"
|
||||
#include "back-passwd.h"
|
||||
|
||||
int
|
||||
passwd_back_db_config(
|
||||
|
|
|
|||
|
|
@ -19,11 +19,6 @@
|
|||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_init passwd_back_initialize;
|
||||
extern BI_destroy passwd_back_destroy;
|
||||
|
||||
extern BI_op_search passwd_back_search;
|
||||
|
||||
extern BI_db_config passwd_back_db_config;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "slap.h"
|
||||
#include "back-passwd.h"
|
||||
#include "external.h"
|
||||
|
||||
ldap_pvt_thread_mutex_t passwd_mutex;
|
||||
|
||||
|
|
|
|||
29
servers/slapd/back-passwd/proto-passwd.h
Normal file
29
servers/slapd/back-passwd/proto-passwd.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* $OpenLDAP$ */
|
||||
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
*
|
||||
* Copyright 1998-2004 The OpenLDAP Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted only as authorized by the OpenLDAP
|
||||
* Public License.
|
||||
*
|
||||
* A copy of this license is available in the file LICENSE in the
|
||||
* top-level directory of the distribution or, alternatively, at
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#ifndef PROTO_PASSWD_H
|
||||
#define PROTO_PASSWD_H
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_destroy passwd_back_destroy;
|
||||
|
||||
extern BI_db_config passwd_back_db_config;
|
||||
|
||||
extern BI_op_search passwd_back_search;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* PROTO_PASSWD_H */
|
||||
|
|
@ -21,29 +21,6 @@
|
|||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_init perl_back_initialize;
|
||||
extern BI_open perl_back_open;
|
||||
extern BI_close perl_back_close;
|
||||
extern BI_destroy perl_back_destroy;
|
||||
|
||||
extern BI_db_init perl_back_db_init;
|
||||
extern BI_db_open perl_back_db_open;
|
||||
extern BI_db_destroy perl_back_db_destroy;
|
||||
|
||||
extern BI_db_config perl_back_db_config;
|
||||
|
||||
extern BI_op_bind perl_back_bind;
|
||||
|
||||
extern BI_op_search perl_back_search;
|
||||
|
||||
extern BI_op_compare perl_back_compare;
|
||||
|
||||
extern BI_op_modify perl_back_modify;
|
||||
|
||||
extern BI_op_modrdn perl_back_modrdn;
|
||||
|
||||
extern BI_op_add perl_back_add;
|
||||
|
||||
extern BI_op_delete perl_back_delete;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "perl_back.h"
|
||||
|
||||
#include "external.h"
|
||||
|
||||
static void perl_back_xs_init LDAP_P((PERL_BACK_XS_INIT_PARAMS));
|
||||
EXT void boot_DynaLoader LDAP_P((PERL_BACK_BOOT_DYNALOADER_PARAMS));
|
||||
|
|
|
|||
|
|
@ -70,6 +70,6 @@ typedef struct perl_backend_instance {
|
|||
|
||||
LDAP_END_DECL
|
||||
|
||||
#include "external.h"
|
||||
#include "proto-perl.h"
|
||||
|
||||
#endif
|
||||
#endif /* PERL_BACK_H */
|
||||
|
|
|
|||
42
servers/slapd/back-perl/proto-perl.h
Normal file
42
servers/slapd/back-perl/proto-perl.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* $OpenLDAP$ */
|
||||
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
*
|
||||
* Copyright 1999-2004 The OpenLDAP Foundation.
|
||||
* Portions Copyright 1999 John C. Quillan.
|
||||
* Portions Copyright 2002 myinternet Limited.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted only as authorized by the OpenLDAP
|
||||
* Public License.
|
||||
*
|
||||
* A copy of this license is available in file LICENSE in the
|
||||
* top-level directory of the distribution or, alternatively, at
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#ifndef PROTO_PERL_H
|
||||
#define PROTO_PERL_H
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_open perl_back_open;
|
||||
extern BI_close perl_back_close;
|
||||
extern BI_destroy perl_back_destroy;
|
||||
|
||||
extern BI_db_init perl_back_db_init;
|
||||
extern BI_db_open perl_back_db_open;
|
||||
extern BI_db_destroy perl_back_db_destroy;
|
||||
extern BI_db_config perl_back_db_config;
|
||||
|
||||
extern BI_op_bind perl_back_bind;
|
||||
extern BI_op_search perl_back_search;
|
||||
extern BI_op_compare perl_back_compare;
|
||||
extern BI_op_modify perl_back_modify;
|
||||
extern BI_op_modrdn perl_back_modrdn;
|
||||
extern BI_op_add perl_back_add;
|
||||
extern BI_op_delete perl_back_delete;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* PROTO_PERL_H */
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef SLAPD_RELAY_H
|
||||
#define SLAPD_RELAY_H
|
||||
|
||||
#include "external.h"
|
||||
#include "proto-back-relay.h"
|
||||
|
||||
/* String rewrite library */
|
||||
|
||||
|
|
|
|||
|
|
@ -23,52 +23,6 @@
|
|||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_init relay_back_initialize;
|
||||
#if 0
|
||||
extern BI_config relay_back_config;
|
||||
extern BI_open relay_back_open;
|
||||
extern BI_close relay_back_close;
|
||||
extern BI_destroy relay_back_destroy;
|
||||
#endif
|
||||
|
||||
extern BI_db_init relay_back_db_init;
|
||||
extern BI_db_config relay_back_db_config;
|
||||
extern BI_db_open relay_back_db_open;
|
||||
extern BI_db_close relay_back_db_close;
|
||||
extern BI_db_destroy relay_back_db_destroy;
|
||||
|
||||
extern BI_op_bind relay_back_op_bind;
|
||||
extern BI_op_unbind relay_back_op_unbind;
|
||||
extern BI_op_search relay_back_op_search;
|
||||
extern BI_op_compare relay_back_op_compare;
|
||||
extern BI_op_modify relay_back_op_modify;
|
||||
extern BI_op_modrdn relay_back_op_modrdn;
|
||||
extern BI_op_add relay_back_op_add;
|
||||
extern BI_op_delete relay_back_op_delete;
|
||||
extern BI_op_abandon relay_back_op_abandon;
|
||||
extern BI_op_cancel relay_back_op_cancel;
|
||||
extern BI_op_extended relay_back_op_extended;
|
||||
extern BI_entry_release_rw relay_back_entry_release_rw;
|
||||
extern BI_entry_get_rw relay_back_entry_get_rw;
|
||||
extern BI_chk_referrals relay_back_chk_referrals;
|
||||
extern BI_operational relay_back_operational;
|
||||
extern BI_has_subordinates relay_back_has_subordinates;
|
||||
|
||||
extern BI_connection_init relay_back_connection_init;
|
||||
extern BI_connection_destroy relay_back_connection_destroy;
|
||||
|
||||
#if 0
|
||||
extern BI_tool_entry_open relay_back_tool_entry_open;
|
||||
extern BI_tool_entry_close relay_back_tool_entry_close;
|
||||
extern BI_tool_entry_first relay_back_tool_entry_first;
|
||||
extern BI_tool_entry_next relay_back_tool_entry_next;
|
||||
extern BI_tool_entry_get relay_back_tool_entry_get;
|
||||
extern BI_tool_entry_put relay_back_tool_entry_put;
|
||||
extern BI_tool_entry_reindex relay_back_tool_entry_reindex;
|
||||
extern BI_tool_sync relay_back_tool_sync;
|
||||
extern BI_tool_dn2id_get relay_back_tool_dn2id_get;
|
||||
extern BI_tool_id2entry_get relay_back_tool_id2entry_get;
|
||||
extern BI_tool_entry_modify relay_back_tool_entry_modify;
|
||||
#endif
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "slap.h"
|
||||
#include "back-relay.h"
|
||||
#include "external.h"
|
||||
|
||||
#if SLAPD_RELAY == SLAPD_MOD_DYNAMIC
|
||||
|
||||
|
|
|
|||
|
|
@ -22,10 +22,34 @@
|
|||
|
||||
#include <ldap_cdefs.h>
|
||||
|
||||
#include "external.h"
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_db_init relay_back_db_init;
|
||||
extern BI_db_config relay_back_db_config;
|
||||
extern BI_db_open relay_back_db_open;
|
||||
extern BI_db_close relay_back_db_close;
|
||||
extern BI_db_destroy relay_back_db_destroy;
|
||||
|
||||
extern BI_op_bind relay_back_op_bind;
|
||||
extern BI_op_unbind relay_back_op_unbind;
|
||||
extern BI_op_search relay_back_op_search;
|
||||
extern BI_op_compare relay_back_op_compare;
|
||||
extern BI_op_modify relay_back_op_modify;
|
||||
extern BI_op_modrdn relay_back_op_modrdn;
|
||||
extern BI_op_add relay_back_op_add;
|
||||
extern BI_op_delete relay_back_op_delete;
|
||||
extern BI_op_abandon relay_back_op_abandon;
|
||||
extern BI_op_cancel relay_back_op_cancel;
|
||||
extern BI_op_extended relay_back_op_extended;
|
||||
extern BI_entry_release_rw relay_back_entry_release_rw;
|
||||
extern BI_entry_get_rw relay_back_entry_get_rw;
|
||||
extern BI_chk_referrals relay_back_chk_referrals;
|
||||
extern BI_operational relay_back_operational;
|
||||
extern BI_has_subordinates relay_back_has_subordinates;
|
||||
|
||||
extern BI_connection_init relay_back_connection_init;
|
||||
extern BI_connection_destroy relay_back_connection_destroy;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* PROTO_BACK_RELAY */
|
||||
|
|
|
|||
|
|
@ -33,30 +33,6 @@
|
|||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_init shell_back_initialize;
|
||||
extern BI_open shell_back_open;
|
||||
extern BI_close shell_back_close;
|
||||
extern BI_destroy shell_back_destroy;
|
||||
|
||||
extern BI_db_init shell_back_db_init;
|
||||
extern BI_db_destroy shell_back_db_destroy;
|
||||
|
||||
extern BI_db_config shell_back_db_config;
|
||||
|
||||
extern BI_op_bind shell_back_bind;
|
||||
|
||||
extern BI_op_unbind shell_back_unbind;
|
||||
|
||||
extern BI_op_search shell_back_search;
|
||||
|
||||
extern BI_op_compare shell_back_compare;
|
||||
|
||||
extern BI_op_modify shell_back_modify;
|
||||
|
||||
extern BI_op_modrdn shell_back_modrdn;
|
||||
|
||||
extern BI_op_add shell_back_add;
|
||||
|
||||
extern BI_op_delete shell_back_delete;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,9 @@
|
|||
#include <ac/socket.h>
|
||||
|
||||
#include "slap.h"
|
||||
|
||||
#include "shell.h"
|
||||
#include "external.h"
|
||||
|
||||
#if SLAPD_SHELL == SLAPD_MOD_DYNAMIC
|
||||
|
||||
|
|
|
|||
54
servers/slapd/back-shell/proto-shell.h
Normal file
54
servers/slapd/back-shell/proto-shell.h
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/* $OpenLDAP$ */
|
||||
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
*
|
||||
* Copyright 1998-2004 The OpenLDAP Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted only as authorized by the OpenLDAP
|
||||
* Public License.
|
||||
*
|
||||
* A copy of this license is available in the file LICENSE in the
|
||||
* top-level directory of the distribution or, alternatively, at
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
/* Portions Copyright (c) 1995 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that this notice is preserved and that due credit is given
|
||||
* to the University of Michigan at Ann Arbor. The name of the University
|
||||
* may not be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission. This software
|
||||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
/* ACKNOWLEDGEMENTS:
|
||||
* This work was originally developed by the University of Michigan
|
||||
* (as part of U-MICH LDAP).
|
||||
*/
|
||||
|
||||
#ifndef PROTO_SHELL_H
|
||||
#define PROTO_SHELL_H
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_open shell_back_open;
|
||||
extern BI_close shell_back_close;
|
||||
extern BI_destroy shell_back_destroy;
|
||||
|
||||
extern BI_db_init shell_back_db_init;
|
||||
extern BI_db_destroy shell_back_db_destroy;
|
||||
extern BI_db_config shell_back_db_config;
|
||||
|
||||
extern BI_op_bind shell_back_bind;
|
||||
extern BI_op_unbind shell_back_unbind;
|
||||
extern BI_op_search shell_back_search;
|
||||
extern BI_op_compare shell_back_compare;
|
||||
extern BI_op_modify shell_back_modify;
|
||||
extern BI_op_modrdn shell_back_modrdn;
|
||||
extern BI_op_add shell_back_add;
|
||||
extern BI_op_delete shell_back_delete;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* PROTO_SHELL_H */
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
#ifndef SLAPD_SHELL_H
|
||||
#define SLAPD_SHELL_H
|
||||
|
||||
#include "external.h"
|
||||
#include "proto-shell.h"
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,6 @@
|
|||
#ifndef __BACKSQL_H__
|
||||
#define __BACKSQL_H__
|
||||
|
||||
#include "external.h"
|
||||
#include "sql-types.h"
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -23,27 +23,7 @@
|
|||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
extern BI_init backsql_initialize;
|
||||
extern BI_destroy backsql_destroy;
|
||||
|
||||
extern BI_db_init backsql_db_init;
|
||||
extern BI_db_open backsql_db_open;
|
||||
extern BI_db_close backsql_db_close;
|
||||
extern BI_db_destroy backsql_db_destroy;
|
||||
|
||||
extern BI_db_config backsql_db_config;
|
||||
|
||||
extern BI_op_bind backsql_bind;
|
||||
extern BI_op_search backsql_search;
|
||||
extern BI_op_compare backsql_compare;
|
||||
extern BI_op_modify backsql_modify;
|
||||
extern BI_op_modrdn backsql_modrdn;
|
||||
extern BI_op_add backsql_add;
|
||||
extern BI_op_delete backsql_delete;
|
||||
|
||||
extern BI_operational backsql_operational;
|
||||
|
||||
extern BI_connection_destroy backsql_connection_destroy;
|
||||
extern BI_init sql_back_initialize;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "slap.h"
|
||||
#include "proto-sql.h"
|
||||
#include "external.h"
|
||||
|
||||
#if SLAPD_SQL == SLAPD_MOD_DYNAMIC
|
||||
|
||||
|
|
@ -40,7 +41,7 @@ init_module(
|
|||
|
||||
memset( &bi, '\0', sizeof( bi ) );
|
||||
bi.bi_type = "sql";
|
||||
bi.bi_init = backsql_initialize;
|
||||
bi.bi_init = sql_back_initialize;
|
||||
|
||||
backend_add( &bi );
|
||||
return 0;
|
||||
|
|
@ -49,7 +50,7 @@ init_module(
|
|||
#endif /* SLAPD_SQL == SLAPD_MOD_DYNAMIC */
|
||||
|
||||
int
|
||||
backsql_initialize(
|
||||
sql_back_initialize(
|
||||
BackendInfo *bi )
|
||||
{
|
||||
static char *controls[] = {
|
||||
|
|
@ -66,7 +67,7 @@ backsql_initialize(
|
|||
|
||||
bi->bi_controls = controls;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,"==>backsql_initialize()\n", 0, 0, 0 );
|
||||
Debug( LDAP_DEBUG_TRACE,"==>sql_back_initialize()\n", 0, 0, 0 );
|
||||
|
||||
bi->bi_open = 0;
|
||||
bi->bi_config = 0;
|
||||
|
|
@ -95,7 +96,7 @@ backsql_initialize(
|
|||
bi->bi_connection_init = 0;
|
||||
bi->bi_connection_destroy = backsql_connection_destroy;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,"<==backsql_initialize()\n", 0, 0, 0 );
|
||||
Debug( LDAP_DEBUG_TRACE,"<==sql_back_initialize()\n", 0, 0, 0 );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -256,4 +256,27 @@ int backsql_entryUUID_decode( struct berval *entryUUID, unsigned long *oc_id,
|
|||
#endif /* ! BACKSQL_ARBITRARY_KEY */
|
||||
);
|
||||
|
||||
/*
|
||||
* former external.h
|
||||
*/
|
||||
extern BI_destroy backsql_destroy;
|
||||
|
||||
extern BI_db_init backsql_db_init;
|
||||
extern BI_db_open backsql_db_open;
|
||||
extern BI_db_close backsql_db_close;
|
||||
extern BI_db_destroy backsql_db_destroy;
|
||||
extern BI_db_config backsql_db_config;
|
||||
|
||||
extern BI_op_bind backsql_bind;
|
||||
extern BI_op_search backsql_search;
|
||||
extern BI_op_compare backsql_compare;
|
||||
extern BI_op_modify backsql_modify;
|
||||
extern BI_op_modrdn backsql_modrdn;
|
||||
extern BI_op_add backsql_add;
|
||||
extern BI_op_delete backsql_delete;
|
||||
|
||||
extern BI_operational backsql_operational;
|
||||
|
||||
extern BI_connection_destroy backsql_connection_destroy;
|
||||
|
||||
#endif /* PROTO_SQL_H */
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ static int call_group_preop_plugins( Operation *op );
|
|||
static void call_group_postop_plugins( Operation *op );
|
||||
#endif /* LDAP_SLAPI */
|
||||
|
||||
#if 0
|
||||
|
||||
/*
|
||||
* If a module is configured as dynamic, its header should not
|
||||
* get included into slapd. While this is a general rule and does
|
||||
|
|
@ -152,6 +154,29 @@ static BackendInfo binfo[] = {
|
|||
{NULL}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If a module is configured as dynamic, its header should not
|
||||
* get included into slapd. While this is a general rule and does
|
||||
* not have much of an effect in UNIX, this rule should be adhered
|
||||
* to for Windows, where dynamic object code should not be implicitly
|
||||
* imported into slapd without appropriate __declspec(dllimport) directives.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is automatically generated by configure; it defines
|
||||
* the BackendInfo binfo[] structure with the configured static
|
||||
* backend info. It assumes that every backend of type <name>
|
||||
* provides an initialization function
|
||||
*
|
||||
* int name_back_initialize( BackendInfo *bi )
|
||||
*
|
||||
* that populates the rest of the structure.
|
||||
*/
|
||||
|
||||
#include "backend.h"
|
||||
|
||||
int nBackendInfo = 0;
|
||||
BackendInfo *backendInfo = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue