mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
add rwm overlay configure and make stuff (need autoconf/autoheader ...)
This commit is contained in:
parent
0176e02398
commit
b5bba83a31
7 changed files with 60 additions and 5 deletions
24
configure.in
24
configure.in
|
|
@ -247,6 +247,8 @@ OL_ARG_WITH(dyngroup,[ --with-dyngroup Dynamic Group overlay no|yes|mod], n
|
||||||
[no yes mod])
|
[no yes mod])
|
||||||
OL_ARG_WITH(proxycache,[ --with-proxycache Proxy Cache overlay no|yes|mod], no,
|
OL_ARG_WITH(proxycache,[ --with-proxycache Proxy Cache overlay no|yes|mod], no,
|
||||||
[no yes mod])
|
[no yes mod])
|
||||||
|
OL_ARG_WITH(rwm,[ --with-rwm Rewrite/Remap overlay no|yes|mod], no,
|
||||||
|
[no yes mod])
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
dnl SLURPD OPTIONS
|
dnl SLURPD OPTIONS
|
||||||
|
|
@ -374,6 +376,9 @@ if test $ol_enable_slapd = no ; then
|
||||||
if test $ol_with_proxycache != no ; then
|
if test $ol_with_proxycache != no ; then
|
||||||
AC_MSG_WARN([slapd disabled, ignoring --with-proxycache argument])
|
AC_MSG_WARN([slapd disabled, ignoring --with-proxycache argument])
|
||||||
fi
|
fi
|
||||||
|
if test $ol_with_rwm != no ; then
|
||||||
|
AC_MSG_WARN([slapd disabled, ignoring --with-rwm argument])
|
||||||
|
fi
|
||||||
|
|
||||||
# force settings to no
|
# force settings to no
|
||||||
ol_enable_slapi=no
|
ol_enable_slapi=no
|
||||||
|
|
@ -418,6 +423,7 @@ if test $ol_enable_slapd = no ; then
|
||||||
|
|
||||||
ol_with_dyngroup=no
|
ol_with_dyngroup=no
|
||||||
ol_with_proxycache=no
|
ol_with_proxycache=no
|
||||||
|
ol_with_rwm=no
|
||||||
|
|
||||||
elif test $ol_enable_ldbm = no ; then
|
elif test $ol_enable_ldbm = no ; then
|
||||||
dnl SLAPD without LDBM
|
dnl SLAPD without LDBM
|
||||||
|
|
@ -578,6 +584,7 @@ BUILD_SQL_DYNAMIC=static
|
||||||
|
|
||||||
BUILD_DYNGROUP=no
|
BUILD_DYNGROUP=no
|
||||||
BUILD_PROXYCACHE=no
|
BUILD_PROXYCACHE=no
|
||||||
|
BUILD_RWM=no
|
||||||
|
|
||||||
SLAPD_DYNAMIC_OVERLAYS=
|
SLAPD_DYNAMIC_OVERLAYS=
|
||||||
|
|
||||||
|
|
@ -814,6 +821,10 @@ else
|
||||||
AC_MSG_WARN([building static proxycache overlay])
|
AC_MSG_WARN([building static proxycache overlay])
|
||||||
ol_with_proxycache = yes
|
ol_with_proxycache = yes
|
||||||
fi
|
fi
|
||||||
|
if test $ol_with_rwm = mod ; then
|
||||||
|
AC_MSG_WARN([building static rwm overlay])
|
||||||
|
ol_with_rwm = yes
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
|
|
@ -2766,6 +2777,18 @@ if test "$ol_with_proxycache" != no ; then
|
||||||
AC_DEFINE_UNQUOTED(SLAPD_OVER_PROXYCACHE,$MFLAG,[define for Proxy Cache overlay])
|
AC_DEFINE_UNQUOTED(SLAPD_OVER_PROXYCACHE,$MFLAG,[define for Proxy Cache overlay])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$ol_with_rwm " != no ; then
|
||||||
|
BUILD_REWRITE=yes
|
||||||
|
BUILD_RWM=$ol_with_rwm
|
||||||
|
if test "$ol_with_rwm" = mod ; then
|
||||||
|
MFLAG=SLAPD_MOD_DYNAMIC
|
||||||
|
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
|
||||||
|
else
|
||||||
|
MFLAG=SLAPD_MOD_STATIC
|
||||||
|
fi
|
||||||
|
AC_DEFINE_UNQUOTED(SLAPD_OVER_RWM,$MFLAG,[define for Rewrite/Remap overlay])
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
|
if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
|
||||||
$BUILD_SLAPD = yes ; then
|
$BUILD_SLAPD = yes ; then
|
||||||
BUILD_SLURPD=yes
|
BUILD_SLURPD=yes
|
||||||
|
|
@ -2836,6 +2859,7 @@ AC_SUBST(BUILD_SLAPD)
|
||||||
AC_SUBST(BUILD_SQL_DYNAMIC)
|
AC_SUBST(BUILD_SQL_DYNAMIC)
|
||||||
AC_SUBST(BUILD_DYNGROUP)
|
AC_SUBST(BUILD_DYNGROUP)
|
||||||
AC_SUBST(BUILD_PROXYCACHE)
|
AC_SUBST(BUILD_PROXYCACHE)
|
||||||
|
AC_SUBST(BUILD_RWM)
|
||||||
AC_SUBST(BUILD_SLURPD)
|
AC_SUBST(BUILD_SLURPD)
|
||||||
|
|
||||||
AC_SUBST(LDAP_LIBS)
|
AC_SUBST(LDAP_LIBS)
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,10 @@
|
||||||
## top-level directory of the distribution or, alternatively, at
|
## top-level directory of the distribution or, alternatively, at
|
||||||
## <http://www.OpenLDAP.org/license.html>.
|
## <http://www.OpenLDAP.org/license.html>.
|
||||||
|
|
||||||
SRCS = overlays.c dyngroup.c pcache.c
|
SRCS = overlays.c dyngroup.c pcache.c \
|
||||||
OBJS = overlays.lo dyngroup.lo pcache.lo
|
rwm.c rwmconf.c rwmdn.c rwmmap.c
|
||||||
|
OBJS = overlays.lo dyngroup.lo pcache.lo \
|
||||||
|
rwm.lo rwmconf.lo rwmdn.lo rwmmap.lo
|
||||||
|
|
||||||
LDAP_INCDIR= ../../../include
|
LDAP_INCDIR= ../../../include
|
||||||
LDAP_LIBDIR= ../../../libraries
|
LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
@ -37,6 +39,9 @@ dyngroup.la : dyngroup.lo $(@PLAT@_LINK_LIBS)
|
||||||
pcache.la : pcache.lo $(@PLAT@_LINK_LIBS)
|
pcache.la : pcache.lo $(@PLAT@_LINK_LIBS)
|
||||||
$(LTLINK_MOD) -module -o $@ pcache.lo version.lo $(LINK_LIBS)
|
$(LTLINK_MOD) -module -o $@ pcache.lo version.lo $(LINK_LIBS)
|
||||||
|
|
||||||
|
rwm.la : rwm.lo $(@PLAT@_LINK_LIBS)
|
||||||
|
$(LTLINK_MOD) -module -o $@ rwm.lo rwmconf.lo rwmdn.lo rwmmap.lo version.lo $(LINK_LIBS)
|
||||||
|
|
||||||
install-local: $(PROGRAMS)
|
install-local: $(PROGRAMS)
|
||||||
@-$(MKDIR) $(DESTDIR)$(moduledir)
|
@-$(MKDIR) $(DESTDIR)$(moduledir)
|
||||||
@for i in $? ; do \
|
@for i in $? ; do \
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,9 @@ extern int dyngroup_init();
|
||||||
#if SLAPD_OVER_PROXYCACHE == SLAPD_MOD_STATIC
|
#if SLAPD_OVER_PROXYCACHE == SLAPD_MOD_STATIC
|
||||||
extern int pcache_init();
|
extern int pcache_init();
|
||||||
#endif
|
#endif
|
||||||
|
#if SLAPD_OVER_RWM == SLAPD_MOD_STATIC
|
||||||
|
extern int rwm_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
char *name;
|
char *name;
|
||||||
|
|
@ -40,6 +43,9 @@ static struct {
|
||||||
#endif
|
#endif
|
||||||
#if SLAPD_OVER_PROXYCACHE == SLAPD_MOD_STATIC
|
#if SLAPD_OVER_PROXYCACHE == SLAPD_MOD_STATIC
|
||||||
{ "Proxy Cache", pcache_init },
|
{ "Proxy Cache", pcache_init },
|
||||||
|
#endif
|
||||||
|
#if SLAPD_OVER_RWM == SLAPD_MOD_STATIC
|
||||||
|
{ "Rewrite/Remap", rwm_init },
|
||||||
#endif
|
#endif
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#include "portable.h"
|
#include "portable.h"
|
||||||
|
|
||||||
|
#ifdef SLAPD_OVER_RWM
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "slap.h"
|
#include "slap.h"
|
||||||
|
|
@ -521,7 +523,7 @@ rwm_config(
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
rwm_init(
|
rwm_over_init(
|
||||||
BackendDB *be
|
BackendDB *be
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
@ -582,12 +584,12 @@ rwm_destroy(
|
||||||
static slap_overinst rwm = { { NULL } };
|
static slap_overinst rwm = { { NULL } };
|
||||||
|
|
||||||
int
|
int
|
||||||
init_module(void)
|
rwm_init(void)
|
||||||
{
|
{
|
||||||
memset( &rwm, 0, sizeof(slap_overinst) );
|
memset( &rwm, 0, sizeof(slap_overinst) );
|
||||||
|
|
||||||
rwm.on_bi.bi_type = "rewrite-remap";
|
rwm.on_bi.bi_type = "rewrite-remap";
|
||||||
rwm.on_bi.bi_db_init = rwm_init;
|
rwm.on_bi.bi_db_init = rwm_over_init;
|
||||||
rwm.on_bi.bi_db_config = rwm_config;
|
rwm.on_bi.bi_db_config = rwm_config;
|
||||||
rwm.on_bi.bi_db_destroy = rwm_destroy;
|
rwm.on_bi.bi_db_destroy = rwm_destroy;
|
||||||
|
|
||||||
|
|
@ -605,3 +607,10 @@ init_module(void)
|
||||||
return overlay_register( &rwm );
|
return overlay_register( &rwm );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if SLAPD_OVER_RWM == SLAPD_MOD_DYNAMIC
|
||||||
|
int init_module(int argc, char *argv[]) {
|
||||||
|
return rwm_init();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SLAPD_OVER_RWM */
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
|
|
||||||
#include "portable.h"
|
#include "portable.h"
|
||||||
|
|
||||||
|
#ifdef SLAPD_OVER_RWM
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <ac/string.h>
|
#include <ac/string.h>
|
||||||
|
|
@ -300,3 +302,5 @@ suffix_massage_config(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* ENABLE_REWRITE */
|
#endif /* ENABLE_REWRITE */
|
||||||
|
|
||||||
|
#endif /* SLAPD_OVER_RWM */
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@
|
||||||
|
|
||||||
#include "portable.h"
|
#include "portable.h"
|
||||||
|
|
||||||
|
#ifdef SLAPD_OVER_RWM
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <ac/string.h>
|
#include <ac/string.h>
|
||||||
|
|
@ -169,3 +171,5 @@ rwm_dn_massage(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* !ENABLE_REWRITE */
|
#endif /* !ENABLE_REWRITE */
|
||||||
|
|
||||||
|
#endif /* SLAPD_OVER_RWM */
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
|
|
||||||
#include "portable.h"
|
#include "portable.h"
|
||||||
|
|
||||||
|
#ifdef SLAPD_OVER_RWM
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <ac/string.h>
|
#include <ac/string.h>
|
||||||
|
|
@ -560,3 +562,4 @@ mapping_free( void *v_mapping )
|
||||||
ch_free( mapping );
|
ch_free( mapping );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* SLAPD_OVER_RWM */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue