From fc39750a8f9271766596c95ee7622b049061b3ac Mon Sep 17 00:00:00 2001
From: Kurt Zeilenga <kurt@openldap.org>
Date: Tue, 11 Apr 2006 22:43:51 +0000
Subject: [PATCH] sync with HEAD

---
 build/top.mk                          | 1 -
 doc/guide/admin/slapdconfig.sdf       | 5 ++---
 include/ldap_cdefs.h                  | 5 -----
 include/ldap_defaults.h               | 2 --
 libraries/libldap/tls.c               | 1 +
 servers/slapd/alock.c                 | 2 +-
 servers/slapd/back-monitor/database.c | 3 ---
 servers/slapd/dn.c                    | 2 +-
 servers/slapd/kerberos.c              | 2 +-
 servers/slapd/slap.h                  | 5 ++---
 tests/README                          | 1 -
 tests/run.in                          | 5 ++---
 tests/scripts/test006-acls            | 2 +-
 tests/scripts/test034-translucent     | 5 -----
 tests/scripts/test041-aci             | 2 +-
 15 files changed, 12 insertions(+), 31 deletions(-)

diff --git a/build/top.mk b/build/top.mk
index 7e8bf4bbcf..d72cec70d2 100644
--- a/build/top.mk
+++ b/build/top.mk
@@ -157,7 +157,6 @@ LUTIL_LIBS = @LUTIL_LIBS@
 LTHREAD_LIBS = @LTHREAD_LIBS@
 
 BDB_LIBS = @BDB_LIBS@
-LDBM_LIBS = $(BDB_LIBS)
 
 LDAP_LIBLBER_LA = $(LDAP_LIBDIR)/liblber/liblber.la
 LDAP_LIBLDAP_LA = $(LDAP_LIBDIR)/libldap/libldap.la
diff --git a/doc/guide/admin/slapdconfig.sdf b/doc/guide/admin/slapdconfig.sdf
index e421de751b..bd97c8bc1e 100644
--- a/doc/guide/admin/slapdconfig.sdf
+++ b/doc/guide/admin/slapdconfig.sdf
@@ -238,7 +238,6 @@ bdb	Berkeley DB transactional backend
 dnssrv	DNS SRV backend
 hdb	Hierarchical variant of bdb backend
 ldap	Lightweight Directory Access Protocol (Proxy) backend
-ldbm	Lightweight DBM backend
 meta	Meta Directory backend
 monitor	Monitor backend
 passwd	Provides read-only access to {{passwd}}(5)
@@ -530,8 +529,8 @@ The {{EX:realm}} parameter specifies a realm which a certain
 mechanisms authenticate the identity within. The {{EX:secprops}}
 parameter specifies Cyrus SASL security properties.
 
-The syncrepl replication mechanism is supported by the
-three native backends: back-bdb, back-hdb, and back-ldbm.
+The syncrepl replication mechanism is supported by the two primary
+database backends: back-bdb and back-hdb.
 
 See the {{SECT:LDAP Sync Replication}} chapter of the admin guide
 for more information on how to use this directive.
diff --git a/include/ldap_cdefs.h b/include/ldap_cdefs.h
index 126947973f..b4955ea50a 100644
--- a/include/ldap_cdefs.h
+++ b/include/ldap_cdefs.h
@@ -157,11 +157,6 @@
 #	define LDAP_AVL_V(type)		extern type
 #endif
 
-/* LDBM library */
-/* Not exported/imported any more */
-#	define LDAP_LDBM_F(type)	extern type
-#	define LDAP_LDBM_V(type)	extern type
-
 /* LDIF library */
 #if defined(_WIN32) && defined(SLAPD_IMPORT)
 #	define LDAP_LDIF_F(type)	extern __declspec(dllimport) type
diff --git a/include/ldap_defaults.h b/include/ldap_defaults.h
index 861c0c199d..b7b481f666 100644
--- a/include/ldap_defaults.h
+++ b/include/ldap_defaults.h
@@ -56,8 +56,6 @@
 #define SLAPD_DEFAULT_SIZELIMIT		500
 	/* default timelimit to spend on a search */
 #define SLAPD_DEFAULT_TIMELIMIT		3600
-	/* minimum max ids that a single index entry can map to in ldbm */
-#define SLAPD_LDBM_MIN_MAXIDS		(8192-4)
 
 /* the following DNs must be normalized! */
 	/* dn of the default subschema subentry */
diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c
index 504263ed14..450db9d2d0 100644
--- a/libraries/libldap/tls.c
+++ b/libraries/libldap/tls.c
@@ -416,6 +416,7 @@ ldap_pvt_tls_init_def_ctx( int is_server )
 #ifdef LDAP_R_COMPILE
 	ldap_pvt_thread_mutex_unlock( &tls_def_ctx_mutex );
 #endif
+	return rc;
 }
 
 static STACK_OF(X509_NAME) *
diff --git a/servers/slapd/alock.c b/servers/slapd/alock.c
index b0bb33789f..461f4b556c 100644
--- a/servers/slapd/alock.c
+++ b/servers/slapd/alock.c
@@ -21,7 +21,7 @@
 
 #include "portable.h"
 
-#if SLAPD_BDB || SLAPD_HDB || SLAPD_LDBM
+#if SLAPD_BDB || SLAPD_HDB
 
 #include "alock.h"
 
diff --git a/servers/slapd/back-monitor/database.c b/servers/slapd/back-monitor/database.c
index e50b53ff8a..629248ec79 100644
--- a/servers/slapd/back-monitor/database.c
+++ b/servers/slapd/back-monitor/database.c
@@ -42,9 +42,6 @@ static int monitor_back_add_plugin( monitor_info_t *mi, Backend *be, Entry *e );
 #if defined(SLAPD_LDAP) 
 #include "../back-ldap/back-ldap.h"
 #endif /* defined(SLAPD_LDAP) */
-#if 0 && defined(SLAPD_LDBM) 
-#include "../back-ldbm/back-ldbm.h"
-#endif /* defined(SLAPD_LDBM) */
 #if defined(SLAPD_META) 
 #include "../back-meta/back-meta.h"
 #endif /* defined(SLAPD_META) */
diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c
index 7effba1534..83d042d9b4 100644
--- a/servers/slapd/dn.c
+++ b/servers/slapd/dn.c
@@ -1304,7 +1304,7 @@ rdn_validate( struct berval *rdn )
 
 /* build_new_dn:
  *
- * Used by ldbm/bdb2 back_modrdn to create the new dn of entries being
+ * Used by back-bdb back_modrdn to create the new dn of entries being
  * renamed.
  *
  * new_dn = parent (p_dn) + separator + rdn (newrdn) + null.
diff --git a/servers/slapd/kerberos.c b/servers/slapd/kerberos.c
index 225b8d1421..fd145aaf2f 100644
--- a/servers/slapd/kerberos.c
+++ b/servers/slapd/kerberos.c
@@ -1,4 +1,4 @@
-/* kerberos.c - ldbm backend kerberos bind routines */
+/* kerberos.c - kerberos bind routines */
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h
index 19fc5d9cf7..0136ab8242 100644
--- a/servers/slapd/slap.h
+++ b/servers/slapd/slap.h
@@ -62,6 +62,7 @@ LDAP_BEGIN_DECL
 #define SLAP_MULTI_CONN_ARRAY
 #ifdef LDAP_PVT_THREAD_POOL_SEM_LOAD_CONTROL
 #define SLAP_SEM_LOAD_CONTROL
+#endif
 
 #define SLAP_ACL_HONOR_DISCLOSE	/* partially implemented */
 #define SLAP_ACL_HONOR_MANAGE	/* not yet implemented */
@@ -78,7 +79,6 @@ LDAP_BEGIN_DECL
 #ifdef ENABLE_REWRITE
 #define SLAP_AUTH_REWRITE	1 /* use librewrite for sasl-regexp */
 #endif
-#endif
 
 #if defined(LDAP_SLAPI) && !defined(SLAP_OVERLAY_ACCESS)
 #define SLAP_OVERLAY_ACCESS
@@ -1676,8 +1676,7 @@ struct slap_backend_db {
 
 /*
  * define to honor hasSubordinates operational attribute in search filters
- * (in previous use there was a flaw with back-bdb and back-ldbm; now it 
- * is fixed).
+ * (in previous use there was a flaw with back-bdb; now it is fixed).
  */
 #define		be_has_subordinates bd_info->bi_has_subordinates
 
diff --git a/tests/README b/tests/README
index 1a3feed162..b90cc67e18 100644
--- a/tests/README
+++ b/tests/README
@@ -4,7 +4,6 @@ verify basic functionality of the LDAP libraries, slapd, and slurpd.
 	To run all of the tests, type "make test".
 	To run BDB tests, type "make bdb".
 	To run HDB tests, type "make hdb".
-	To run LDBM tests, type "make ldbm".
 	To run SQL tests, define SLAPD_USE_SQL=<rdbms> and type
 		"make sql"; define SLAPD_USE_SQLWRITE=yes
 		to enable write tests as well.
diff --git a/tests/run.in b/tests/run.in
index 6faeed7fd8..5fc0d4863b 100644
--- a/tests/run.in
+++ b/tests/run.in
@@ -27,7 +27,6 @@ export SRCDIR TOPSRCDIR LN_S EGREP_CMD
 AC_bdb=@BUILD_BDB@
 AC_hdb=@BUILD_HDB@
 AC_ldap=ldap@BUILD_LDAP@
-AC_ldbm=@BUILD_LDBM@
 AC_meta=meta@BUILD_META@
 AC_monitor=@BUILD_MONITOR@
 AC_relay=relay@BUILD_RELAY@
@@ -54,7 +53,7 @@ AC_WITH_MODULES_ENABLED=@WITH_MODULES_ENABLED@
 AC_ACI_ENABLED=aci@WITH_ACI_ENABLED@
 AC_THREADS=threads@BUILD_THREAD@
 
-export AC_bdb AC_hdb AC_ldap AC_ldbm AC_meta AC_monitor AC_relay AC_sql \
+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 \
@@ -113,7 +112,7 @@ while test $# -gt 0 ; do
 done
 
 if test -z "$BACKEND" ; then
-	for b in bdb ldbm hdb ; do
+	for b in bdb hdb ; do
 		if eval "test \"\$AC_$b\" != no" ; then
 			BACKEND=$b
 			break
diff --git a/tests/scripts/test006-acls b/tests/scripts/test006-acls
index 23d0fbd5e6..6f131be124 100755
--- a/tests/scripts/test006-acls
+++ b/tests/scripts/test006-acls
@@ -14,7 +14,7 @@
 ## <http://www.OpenLDAP.org/license.html>.
 
 case "$BACKEND" in
-bdb|hdb|ldbm)
+bdb|hdb)
 	;;
 *)
 	echo "Test does not support $BACKEND backend"
diff --git a/tests/scripts/test034-translucent b/tests/scripts/test034-translucent
index 8e52e4a4b8..75ba829868 100755
--- a/tests/scripts/test034-translucent
+++ b/tests/scripts/test034-translucent
@@ -25,11 +25,6 @@ if test $TRANSLUCENT = translucentno ; then
 	exit 0
 fi 
 
-if test $BACKEND = ldbm ; then
-	echo "Translucent Proxy overlay not qualified for use with LDBM, test skipped"
-	exit 0
-fi
-
 if test $AC_ldap = ldapno ; then
 	echo "Translucent Proxy overlay requires back-ldap backend, test skipped"
 	exit 0
diff --git a/tests/scripts/test041-aci b/tests/scripts/test041-aci
index 0d8e27ef48..8d6f9af8f0 100755
--- a/tests/scripts/test041-aci
+++ b/tests/scripts/test041-aci
@@ -14,7 +14,7 @@
 ## <http://www.OpenLDAP.org/license.html>.
 
 case "$BACKEND" in
-bdb|hdb|ldbm)
+bdb|hdb)
 	;;
 *)
 	echo "Test does not support $BACKEND backend"
-- 
GitLab