AC_accesslog=accesslog@BUILD_ACCESSLOG@
AC_dds=dds@BUILD_DDS@
AC_dynlist=dynlist@BUILD_DYNLIST@
+AC_memberof=memberof@BUILD_MEMBEROF@
AC_pcache=pcache@BUILD_PROXYCACHE@
AC_ppolicy=ppolicy@BUILD_PPOLICY@
AC_refint=refint@BUILD_REFINT@
fi
export AC_bdb AC_hdb AC_ldap AC_meta AC_monitor AC_relay AC_sql \
- AC_accesslog AC_dynlist AC_pcache AC_ppolicy AC_refint AC_retcode \
- AC_rwm AC_unique AC_syncprov AC_translucent AC_valsort \
- AC_dds \
+ AC_accesslog AC_dds AC_dynlist AC_memberof AC_pcache AC_ppolicy \
+ AC_refint AC_retcode AC_rwm AC_unique AC_syncprov AC_translucent \
+ AC_valsort \
AC_WITH_SASL AC_WITH_TLS AC_WITH_MODULES_ENABLED AC_ACI_ENABLED \
AC_THREADS AC_LIBS_DYNAMIC
-e "s/^#${AC_accesslog}#//" \
-e "s/^#${AC_dds}#//" \
-e "s/^#${AC_dynlist}#//" \
+ -e "s/^#${AC_memberof}#//" \
-e "s/^#${AC_pcache}#//" \
-e "s/^#${AC_ppolicy}#//" \
-e "s/^#${AC_refint}#//" \
ACCESSLOG=${AC_accesslog-accesslogno}
DDS=${AC_dds-ddsno}
DYNLIST=${AC_dynlist-dynlistno}
+MEMBEROF=${AC_memberof-memberofno}
PROXYCACHE=${AC_pcache-pcacheno}
PPOLICY=${AC_ppolicy-ppolicyno}
REFINT=${AC_refint-refintno}
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
+if test $MEMBEROF = memberofno; then
+ echo "Memberof overlay not available, test skipped"
+ exit 0
+fi
+
mkdir -p $TESTDIR $DBDIR1 $TESTDIR/confdir
$SLAPPASSWD -g -n >$CONFIGPWF
cat /dev/null > $TESTOUT
+if [ "$MEMBEROF" = memberofmod ]; then
+ echo "Inserting memberof overlay on producer..."
+ $LDAPADD -D cn=config -H $URI1 -y $CONFIGPWF <<EOF > $TESTOUT 2>&1
+dn: cn=module,cn=config
+objectClass: olcModuleList
+cn: module
+olcModulePath: ../../../servers/slapd/overlays
+olcModuleLoad: memberof.la
+EOF
+ RC=$?
+ if test $RC != 0 ; then
+ echo "ldapadd failed for moduleLoad ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
+fi
+
echo "Running ldapadd to build slapd config database..."
$LDAPADD -h $LOCALHOST -p $PORT1 -D 'cn=config' -w `cat $CONFIGPWF` \
>> $TESTOUT 2>&1 <<EOF