frontend->backend interface.
SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \
index.c id2children.c nextid.c abandon.c compare.c group.c \
modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
- filterindex.c unbind.c kerberos.c close.c alias.c startup.c
+ filterindex.c unbind.c kerberos.c close.c alias.c
OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \
index.o id2children.o nextid.o abandon.o compare.o group.o \
modify.o modrdn.o delete.o init.o config.o bind.o attr.o \
- filterindex.o unbind.o kerberos.o close.o alias.o startup.o
+ filterindex.o unbind.o kerberos.o close.o alias.o
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
long dbc_blksize;
char *dbc_name;
LDBM dbc_db;
-
-#ifdef HAVE_BERKELEY_DB2
- struct dbcache *dbc_next;
-#endif
};
/* for the cache of attribute information (which are indexed, etc.) */
struct dbcache li_dbcache[MAXDBCACHE];
ldap_pvt_thread_mutex_t li_dbcache_mutex;
ldap_pvt_thread_cond_t li_dbcache_cv;
-
-#ifdef HAVE_BERKELEY_DB2
- /* Berkeley DB2 Environment */
- DB_ENV li_db_env;
-#endif
};
#include "proto-back-ldbm.h"
LDBM db;
struct stat st;
- sprintf( buf, "%s%s%s%s", li->li_directory, DEFAULT_DIRSEP, name, suffix );
+ sprintf( buf, "%s/%s%s", li->li_directory, name, suffix );
Debug( LDAP_DEBUG_TRACE, "=> ldbm_cache_open( \"%s\", %d, %o )\n", buf,
flags, li->li_mode );
li->li_dbcache[i].dbc_name = NULL;
}
-#ifdef HAVE_BERKELEY_DB2
- if ( (li->li_dbcache[i].dbc_db = ldbm_open_env( buf, flags, li->li_mode,
- li->li_dbcachesize, &li->li_db_env )) == NULL ) {
-#else
if ( (li->li_dbcache[i].dbc_db = ldbm_open( buf, flags, li->li_mode,
li->li_dbcachesize )) == NULL ) {
-#endif
Debug( LDAP_DEBUG_TRACE,
"<= ldbm_cache_open NULL \"%s\" errno %d reason \"%s\")\n",
buf, errno, errno > -1 && errno < sys_nerr ?
char *argv[ 4 ];
int i;
+ /* initialize the underlying database system */
+ ldbm_initialize();
+
/* allocate backend-specific stuff */
li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) );
/* arrange to read nextid later (on first request for it) */
li->li_nextid = NOID;
-#if SLAPD_NEXTID_CHUNCK > 1
- li->li_nextid_wrote = NOID
+
+#if SLAPD_NEXTID_CHUNK > 1
+ li->li_nextid_wrote = NOID;
#endif
/* default cache size */
/* krbv4_ldap_auth LDAP_P(( Backend *be, struct berval *cred, AUTH_DAT *ad )); */
#endif
-/*
- * startup.c
- */
-
-void ldbm_back_startup LDAP_P(( Backend *be ));
-void ldbm_back_shutdown LDAP_P(( Backend *be ));
-void ldbm_db_errcall LDAP_P(( const char *prefix, char *message ));
-
/*
* nextid.c
*/