1 /* init.c - initialize bdb backend */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2000-2007 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
12 * A copy of this license is available in the file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
20 #include <ac/string.h>
21 #include <ac/unistd.h>
22 #include <ac/stdlib.h>
30 static const struct bdbi_database {
35 } bdbi_databases[] = {
36 { "id2entry" BDB_SUFFIX, "id2entry", DB_BTREE, 0 },
37 { "dn2id" BDB_SUFFIX, "dn2id", DB_BTREE, 0 },
41 typedef void * db_malloc(size_t);
42 typedef void * db_realloc(void *, size_t);
44 #define bdb_db_init BDB_SYMBOL(db_init)
45 #define bdb_db_open BDB_SYMBOL(db_open)
46 #define bdb_db_close BDB_SYMBOL(db_close)
49 bdb_db_init( BackendDB *be )
54 Debug( LDAP_DEBUG_TRACE,
55 LDAP_XSTRING(bdb_db_init) ": Initializing " BDB_UCTYPE " database\n",
58 /* allocate backend-database-specific stuff */
59 bdb = (struct bdb_info *) ch_calloc( 1, sizeof(struct bdb_info) );
61 /* DBEnv parameters */
62 bdb->bi_dbenv_home = ch_strdup( SLAPD_DEFAULT_DB_DIR );
63 bdb->bi_dbenv_xflags = 0;
64 bdb->bi_dbenv_mode = SLAPD_DEFAULT_DB_MODE;
66 bdb->bi_cache.c_maxsize = DEFAULT_CACHE_SIZE;
67 bdb->bi_cache.c_minfree = 1;
69 bdb->bi_lock_detect = DB_LOCK_DEFAULT;
70 bdb->bi_search_stack_depth = DEFAULT_SEARCH_STACK_DEPTH;
71 bdb->bi_search_stack = NULL;
73 ldap_pvt_thread_mutex_init( &bdb->bi_database_mutex );
74 ldap_pvt_thread_mutex_init( &bdb->bi_lastid_mutex );
76 ldap_pvt_thread_mutex_init( &bdb->bi_modrdns_mutex );
78 ldap_pvt_thread_mutex_init( &bdb->bi_cache.c_lru_mutex );
79 ldap_pvt_thread_mutex_init( &bdb->bi_cache.c_count_mutex );
80 ldap_pvt_thread_mutex_init( &bdb->bi_cache.c_eifree_mutex );
81 ldap_pvt_thread_mutex_init( &bdb->bi_cache.c_dntree.bei_kids_mutex );
82 ldap_pvt_thread_rdwr_init ( &bdb->bi_cache.c_rwlock );
83 ldap_pvt_thread_rdwr_init( &bdb->bi_idl_tree_rwlock );
84 ldap_pvt_thread_mutex_init( &bdb->bi_idl_tree_lrulock );
87 Entry *e = entry_alloc();
89 e->e_private = &bdb->bi_cache.c_dntree;
90 BER_BVSTR( &e->e_name, "" );
91 BER_BVSTR( &e->e_nname, "" );
92 bdb->bi_cache.c_dntree.bei_e = e;
96 be->be_cf_ocs = be->bd_info->bi_cf_ocs;
98 rc = bdb_monitor_db_init( be );
104 bdb_db_close( BackendDB *be );
107 bdb_db_open( BackendDB *be )
110 struct bdb_info *bdb = (struct bdb_info *) be->be_private;
111 struct stat stat1, stat2;
113 char path[MAXPATHLEN];
115 int do_recover = 0, do_alock_recover = 0;
116 int alockt, quick = 0;
118 if ( be->be_suffix == NULL ) {
119 Debug( LDAP_DEBUG_ANY,
120 LDAP_XSTRING(bdb_db_open) ": need suffix\n",
125 Debug( LDAP_DEBUG_ARGS,
126 LDAP_XSTRING(bdb_db_open) ": %s\n",
127 be->be_suffix[0].bv_val, 0, 0 );
129 #ifndef BDB_MULTIPLE_SUFFIXES
130 if ( be->be_suffix[1].bv_val ) {
131 Debug( LDAP_DEBUG_ANY,
132 LDAP_XSTRING(bdb_db_open) ": only one suffix allowed\n", 0, 0, 0 );
137 /* Check existence of dbenv_home. Any error means trouble */
138 rc = stat( bdb->bi_dbenv_home, &stat1 );
140 Debug( LDAP_DEBUG_ANY,
141 LDAP_XSTRING(bdb_db_open) ": Cannot access database directory %s (%d)\n",
142 bdb->bi_dbenv_home, errno, 0 );
146 /* Perform database use arbitration/recovery logic */
147 alockt = (slapMode & SLAP_TOOL_READONLY) ? ALOCK_LOCKED : ALOCK_UNIQUE;
148 if ( slapMode & SLAP_TOOL_QUICK ) {
149 alockt |= ALOCK_NOSAVE;
153 rc = alock_open( &bdb->bi_alock_info,
155 bdb->bi_dbenv_home, alockt );
157 /* alockt is TRUE if the existing environment was created in Quick mode */
158 alockt = (rc & ALOCK_NOSAVE) ? 1 : 0;
161 if( rc == ALOCK_RECOVER ) {
162 Debug( LDAP_DEBUG_ANY,
163 LDAP_XSTRING(bdb_db_open) ": unclean shutdown detected;"
164 " attempting recovery.\n",
166 do_alock_recover = 1;
167 do_recover = DB_RECOVER;
168 } else if( rc == ALOCK_BUSY ) {
169 Debug( LDAP_DEBUG_ANY,
170 LDAP_XSTRING(bdb_db_open) ": database already in use\n",
173 } else if( rc != ALOCK_CLEAN ) {
174 Debug( LDAP_DEBUG_ANY,
175 LDAP_XSTRING(bdb_db_open) ": alock package is unstable\n",
181 * The DB_CONFIG file may have changed. If so, recover the
182 * database so that new settings are put into effect. Also
183 * note the possible absence of DB_CONFIG in the log.
185 if( stat( bdb->bi_db_config_path, &stat1 ) == 0 ) {
187 char *ptr = lutil_strcopy(path, bdb->bi_dbenv_home);
188 *ptr++ = LDAP_DIRSEP[0];
189 strcpy( ptr, "__db.001" );
190 if( stat( path, &stat2 ) == 0 ) {
191 if( stat2.st_mtime < stat1.st_mtime ) {
192 Debug( LDAP_DEBUG_ANY,
193 LDAP_XSTRING(bdb_db_open) ": DB_CONFIG for suffix %s has changed.\n"
194 "Performing database recovery to activate new settings.\n",
195 be->be_suffix[0].bv_val, 0, 0 );
196 do_recover = DB_RECOVER;
202 Debug( LDAP_DEBUG_ANY,
203 LDAP_XSTRING(bdb_db_open) ": Warning - No DB_CONFIG file found "
204 "in directory %s: (%d)\n"
205 "Expect poor performance for suffix %s.\n",
206 bdb->bi_dbenv_home, errno, be->be_suffix[0].bv_val );
209 /* Always let slapcat run, regardless of environment state.
210 * This can be used to cause a cache flush after an unclean
213 if ( do_recover && ( slapMode & SLAP_TOOL_READONLY )) {
214 Debug( LDAP_DEBUG_ANY,
215 LDAP_XSTRING(bdb_db_open) ": Recovery skipped in read-only mode. "
216 "Run manual recovery if errors are encountered.\n",
222 /* An existing environment in Quick mode has nothing to recover. */
223 if ( alockt && do_recover ) {
224 Debug( LDAP_DEBUG_ANY,
225 LDAP_XSTRING(bdb_db_open) ": cannot recover, database must be reinitialized.\n",
231 rc = db_env_create( &bdb->bi_dbenv, 0 );
233 Debug( LDAP_DEBUG_ANY,
234 LDAP_XSTRING(bdb_db_open) ": db_env_create failed: %s (%d)\n",
235 db_strerror(rc), rc, 0 );
240 strcpy( path, bdb->bi_dbenv_home );
244 dbhome = bdb->bi_dbenv_home;
247 /* If existing environment is clean but doesn't support
248 * currently requested modes, remove it.
250 if ( !do_recover && ( alockt ^ quick )) {
252 rc = bdb->bi_dbenv->remove( bdb->bi_dbenv, dbhome, DB_FORCE );
254 Debug( LDAP_DEBUG_ANY,
255 LDAP_XSTRING(bdb_db_open) ": dbenv remove failed: %s (%d)\n",
256 db_strerror(rc), rc, 0 );
257 bdb->bi_dbenv = NULL;
260 rc = db_env_create( &bdb->bi_dbenv, 0 );
262 Debug( LDAP_DEBUG_ANY,
263 LDAP_XSTRING(bdb_db_open) ": db_env_create failed: %s (%d)\n",
264 db_strerror(rc), rc, 0 );
269 bdb->bi_dbenv->set_errpfx( bdb->bi_dbenv, be->be_suffix[0].bv_val );
270 bdb->bi_dbenv->set_errcall( bdb->bi_dbenv, bdb_errcall );
272 bdb->bi_dbenv->set_lk_detect( bdb->bi_dbenv, bdb->bi_lock_detect );
274 /* One long-lived TXN per thread, two TXNs per write op */
275 bdb->bi_dbenv->set_tx_max( bdb->bi_dbenv, connection_pool_max * 3 );
277 if( bdb->bi_dbenv_xflags != 0 ) {
278 rc = bdb->bi_dbenv->set_flags( bdb->bi_dbenv,
279 bdb->bi_dbenv_xflags, 1);
281 Debug( LDAP_DEBUG_ANY,
282 LDAP_XSTRING(bdb_db_open) ": dbenv_set_flags failed: %s (%d)\n",
283 db_strerror(rc), rc, 0 );
288 #define BDB_TXN_FLAGS (DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_TXN)
290 Debug( LDAP_DEBUG_TRACE,
291 LDAP_XSTRING(bdb_db_open) ": dbenv_open(%s)\n",
292 bdb->bi_dbenv_home, 0, 0);
294 flags = DB_INIT_MPOOL | DB_CREATE | DB_THREAD;
297 flags |= BDB_TXN_FLAGS;
299 /* If a key was set, use shared memory for the BDB environment */
300 if ( bdb->bi_shm_key ) {
301 bdb->bi_dbenv->set_shm_key( bdb->bi_dbenv, bdb->bi_shm_key );
302 flags |= DB_SYSTEM_MEM;
304 rc = bdb->bi_dbenv->open( bdb->bi_dbenv, dbhome,
305 flags | do_recover, bdb->bi_dbenv_mode );
308 /* Regular open faied, probably a missing shm environment.
309 * Start over, do a recovery.
311 if ( !do_recover && bdb->bi_shm_key ) {
312 bdb->bi_dbenv->close( bdb->bi_dbenv, 0 );
313 rc = db_env_create( &bdb->bi_dbenv, 0 );
315 Debug( LDAP_DEBUG_ANY, LDAP_XSTRING(bdb_db_open)
316 ": Shared memory env open failed, assuming stale env\n",
321 Debug( LDAP_DEBUG_ANY,
322 LDAP_XSTRING(bdb_db_open) ": Database cannot be %s, err %d. "
323 "Restore from backup!\n",
324 do_recover ? "recovered" : "opened", rc, 0);
328 if ( do_alock_recover && alock_recover (&bdb->bi_alock_info) != 0 ) {
329 Debug( LDAP_DEBUG_ANY,
330 LDAP_XSTRING(bdb_db_open) ": alock_recover failed\n",
336 #ifdef SLAP_ZONE_ALLOC
337 if ( bdb->bi_cache.c_maxsize ) {
338 bdb->bi_cache.c_zctx = slap_zn_mem_create(
339 SLAP_ZONE_INITSIZE, SLAP_ZONE_MAXSIZE,
340 SLAP_ZONE_DELTA, SLAP_ZONE_SIZE);
344 if ( bdb->bi_idl_cache_max_size ) {
345 bdb->bi_idl_tree = NULL;
346 bdb->bi_idl_cache_size = 0;
349 flags = DB_THREAD | bdb->bi_db_opflags;
351 #ifdef DB_AUTO_COMMIT
353 flags |= DB_AUTO_COMMIT;
356 bdb->bi_databases = (struct bdb_db_info **) ch_malloc(
357 BDB_INDICES * sizeof(struct bdb_db_info *) );
359 /* open (and create) main database */
360 for( i = 0; bdbi_databases[i].name; i++ ) {
361 struct bdb_db_info *db;
363 db = (struct bdb_db_info *) ch_calloc(1, sizeof(struct bdb_db_info));
365 rc = db_create( &db->bdi_db, bdb->bi_dbenv, 0 );
367 Debug( LDAP_DEBUG_ANY,
368 LDAP_XSTRING(bdb_db_open) ": db_create(%s) failed: %s (%d)\n",
369 bdb->bi_dbenv_home, db_strerror(rc), rc );
373 if( i == BDB_ID2ENTRY ) {
374 if ( slapMode & SLAP_TOOL_MODE )
375 db->bdi_db->mpf->set_priority( db->bdi_db->mpf,
376 DB_PRIORITY_VERY_LOW );
378 rc = db->bdi_db->set_pagesize( db->bdi_db,
379 BDB_ID2ENTRY_PAGESIZE );
380 if ( slapMode & SLAP_TOOL_READMAIN ) {
386 rc = db->bdi_db->set_flags( db->bdi_db,
387 DB_DUP | DB_DUPSORT );
389 if ( slapMode & SLAP_TOOL_READONLY ) {
395 if ( slapMode & (SLAP_TOOL_READONLY|SLAP_TOOL_READMAIN) ) {
401 rc = db->bdi_db->set_pagesize( db->bdi_db,
406 strcpy( path, bdbi_databases[i].file );
408 rc = DB_OPEN( db->bdi_db,
410 /* bdbi_databases[i].name, */ NULL,
411 bdbi_databases[i].type,
412 bdbi_databases[i].flags | flags,
413 bdb->bi_dbenv_mode );
415 rc = DB_OPEN( db->bdi_db,
416 bdbi_databases[i].file,
417 /* bdbi_databases[i].name, */ NULL,
418 bdbi_databases[i].type,
419 bdbi_databases[i].flags | flags,
420 bdb->bi_dbenv_mode );
424 char buf[SLAP_TEXT_BUFLEN];
426 snprintf( buf, sizeof(buf), "%s/%s",
427 bdb->bi_dbenv_home, bdbi_databases[i].file );
428 Debug( LDAP_DEBUG_ANY,
429 LDAP_XSTRING(bdb_db_open) ": db_open(%s) failed: %s (%d)\n",
430 buf, db_strerror(rc), rc );
431 db->bdi_db->close( db->bdi_db, 0 );
435 flags &= ~(DB_CREATE | DB_RDONLY);
436 db->bdi_name = bdbi_databases[i].name;
437 bdb->bi_databases[i] = db;
440 bdb->bi_databases[i] = NULL;
441 bdb->bi_ndatabases = i;
444 rc = bdb_last_id( be, NULL );
446 Debug( LDAP_DEBUG_ANY,
447 LDAP_XSTRING(bdb_db_open) ": last_id(%s) failed: %s (%d)\n",
448 bdb->bi_dbenv_home, db_strerror(rc), rc );
453 XLOCK_ID(bdb->bi_dbenv, &bdb->bi_cache.c_locker);
457 rc = bdb_monitor_db_open( be );
462 bdb->bi_flags |= BDB_IS_OPEN;
464 entry_prealloc( bdb->bi_cache.c_maxsize );
465 attr_prealloc( bdb->bi_cache.c_maxsize * 20 );
474 bdb_db_close( BackendDB *be )
477 struct bdb_info *bdb = (struct bdb_info *) be->be_private;
478 struct bdb_db_info *db;
479 bdb_idl_cache_entry_t *entry, *next_entry;
481 /* monitor handling */
482 (void)bdb_monitor_db_close( be );
484 bdb->bi_flags &= ~BDB_IS_OPEN;
486 ber_bvarray_free( bdb->bi_db_config );
487 bdb->bi_db_config = NULL;
489 while( bdb->bi_databases && bdb->bi_ndatabases-- ) {
490 db = bdb->bi_databases[bdb->bi_ndatabases];
491 rc = db->bdi_db->close( db->bdi_db, 0 );
492 /* Lower numbered names are not strdup'd */
493 if( bdb->bi_ndatabases >= BDB_NDB )
494 free( db->bdi_name );
497 free( bdb->bi_databases );
498 bdb->bi_databases = NULL;
500 bdb_cache_release_all (&bdb->bi_cache);
502 if ( bdb->bi_idl_cache_size ) {
503 avl_free( bdb->bi_idl_tree, NULL );
504 bdb->bi_idl_tree = NULL;
505 entry = bdb->bi_idl_lru_head;
507 next_entry = entry->idl_lru_next;
510 free( entry->kstr.bv_val );
513 } while ( entry != bdb->bi_idl_lru_head );
514 bdb->bi_idl_lru_head = bdb->bi_idl_lru_tail = NULL;
517 /* close db environment */
518 if( bdb->bi_dbenv ) {
519 /* Free cache locker if we enabled locking */
520 if ( !( slapMode & SLAP_TOOL_QUICK )) {
521 XLOCK_ID_FREE(bdb->bi_dbenv, bdb->bi_cache.c_locker);
522 bdb->bi_cache.c_locker = 0;
524 #ifdef BDB_REUSE_LOCKERS
525 bdb_locker_flush( bdb->bi_dbenv );
527 /* force a checkpoint, but not if we were ReadOnly,
528 * and not in Quick mode since there are no transactions there.
530 if ( !( slapMode & ( SLAP_TOOL_QUICK|SLAP_TOOL_READONLY ))) {
531 rc = TXN_CHECKPOINT( bdb->bi_dbenv, 0, 0, DB_FORCE );
533 Debug( LDAP_DEBUG_ANY,
534 "bdb_db_close: txn_checkpoint failed: %s (%d)\n",
535 db_strerror(rc), rc, 0 );
539 rc = bdb->bi_dbenv->close( bdb->bi_dbenv, 0 );
540 bdb->bi_dbenv = NULL;
542 Debug( LDAP_DEBUG_ANY,
543 "bdb_db_close: close failed: %s (%d)\n",
544 db_strerror(rc), rc, 0 );
549 rc = alock_close( &bdb->bi_alock_info );
551 Debug( LDAP_DEBUG_ANY,
552 "bdb_db_close: alock_close failed\n", 0, 0, 0 );
560 bdb_db_destroy( BackendDB *be )
562 struct bdb_info *bdb = (struct bdb_info *) be->be_private;
564 /* monitor handling */
565 (void)bdb_monitor_db_destroy( be );
567 if( bdb->bi_dbenv_home ) ch_free( bdb->bi_dbenv_home );
568 if( bdb->bi_db_config_path ) ch_free( bdb->bi_db_config_path );
570 bdb_attr_index_destroy( bdb );
572 ldap_pvt_thread_rdwr_destroy ( &bdb->bi_cache.c_rwlock );
573 ldap_pvt_thread_mutex_destroy( &bdb->bi_cache.c_lru_mutex );
574 ldap_pvt_thread_mutex_destroy( &bdb->bi_cache.c_count_mutex );
575 ldap_pvt_thread_mutex_destroy( &bdb->bi_cache.c_eifree_mutex );
576 ldap_pvt_thread_mutex_destroy( &bdb->bi_cache.c_dntree.bei_kids_mutex );
578 ldap_pvt_thread_mutex_destroy( &bdb->bi_modrdns_mutex );
580 ldap_pvt_thread_mutex_destroy( &bdb->bi_lastid_mutex );
581 ldap_pvt_thread_mutex_destroy( &bdb->bi_database_mutex );
582 ldap_pvt_thread_rdwr_destroy( &bdb->bi_idl_tree_rwlock );
583 ldap_pvt_thread_mutex_destroy( &bdb->bi_idl_tree_lrulock );
587 e = bdb->bi_cache.c_dntree.bei_e;
588 bdb->bi_cache.c_dntree.bei_e = NULL;
590 BER_BVZERO( &e->e_name );
591 BER_BVZERO( &e->e_nname );
596 be->be_private = NULL;
607 static char *controls[] = {
609 LDAP_CONTROL_MANAGEDSAIT,
611 LDAP_CONTROL_PAGEDRESULTS,
612 LDAP_CONTROL_PRE_READ,
613 LDAP_CONTROL_POST_READ,
614 LDAP_CONTROL_SUBENTRIES,
615 LDAP_CONTROL_X_PERMISSIVE_MODIFY,
617 LDAP_CONTROL_X_TXN_SPEC,
622 /* initialize the underlying database system */
623 Debug( LDAP_DEBUG_TRACE,
624 LDAP_XSTRING(bdb_back_initialize) ": initialize "
625 BDB_UCTYPE " backend\n", 0, 0, 0 );
628 SLAP_BFLAG_INCREMENT |
629 SLAP_BFLAG_SUBENTRIES |
631 SLAP_BFLAG_REFERRALS;
633 bi->bi_controls = controls;
635 { /* version check */
636 int major, minor, patch, ver;
637 char *version = db_version( &major, &minor, &patch );
641 /* All our stdio does an ASCII to EBCDIC conversion on
642 * the output. Strings from the BDB library are already
643 * in EBCDIC; we have to go back and forth...
645 strcpy( v2, version );
650 ver = (major << 24) | (minor << 16) | patch;
651 if( ver != DB_VERSION_FULL ) {
652 /* fail if a versions don't match */
653 Debug( LDAP_DEBUG_ANY,
654 LDAP_XSTRING(bdb_back_initialize) ": "
655 "BDB library version mismatch:"
656 " expected " DB_VERSION_STRING ","
657 " got %s\n", version, 0, 0 );
661 Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_back_initialize)
662 ": %s\n", version, 0, 0 );
665 db_env_set_func_free( ber_memfree );
666 db_env_set_func_malloc( (db_malloc *)ber_memalloc );
667 db_env_set_func_realloc( (db_realloc *)ber_memrealloc );
669 /* This is a no-op on a NO_THREAD build. Leave the default
670 * alone so that BDB will sleep on interprocess conflicts.
672 db_env_set_func_yield( ldap_pvt_thread_yield );
680 bi->bi_db_init = bdb_db_init;
681 bi->bi_db_config = config_generic_wrapper;
682 bi->bi_db_open = bdb_db_open;
683 bi->bi_db_close = bdb_db_close;
684 bi->bi_db_destroy = bdb_db_destroy;
686 bi->bi_op_add = bdb_add;
687 bi->bi_op_bind = bdb_bind;
688 bi->bi_op_compare = bdb_compare;
689 bi->bi_op_delete = bdb_delete;
690 bi->bi_op_modify = bdb_modify;
691 bi->bi_op_modrdn = bdb_modrdn;
692 bi->bi_op_search = bdb_search;
694 bi->bi_op_unbind = 0;
696 bi->bi_extended = bdb_extended;
698 bi->bi_chk_referrals = bdb_referrals;
699 bi->bi_operational = bdb_operational;
700 bi->bi_has_subordinates = bdb_hasSubordinates;
701 bi->bi_entry_release_rw = bdb_entry_release;
702 bi->bi_entry_get_rw = bdb_entry_get;
705 * hooks for slap tools
707 bi->bi_tool_entry_open = bdb_tool_entry_open;
708 bi->bi_tool_entry_close = bdb_tool_entry_close;
709 bi->bi_tool_entry_first = bdb_tool_entry_next;
710 bi->bi_tool_entry_next = bdb_tool_entry_next;
711 bi->bi_tool_entry_get = bdb_tool_entry_get;
712 bi->bi_tool_entry_put = bdb_tool_entry_put;
713 bi->bi_tool_entry_reindex = bdb_tool_entry_reindex;
714 bi->bi_tool_sync = 0;
715 bi->bi_tool_dn2id_get = bdb_tool_dn2id_get;
716 bi->bi_tool_id2entry_get = bdb_tool_id2entry_get;
717 bi->bi_tool_entry_modify = bdb_tool_entry_modify;
719 bi->bi_connection_init = 0;
720 bi->bi_connection_destroy = 0;
722 rc = bdb_back_init_cf( bi );
727 #if (SLAPD_BDB == SLAPD_MOD_DYNAMIC && !defined(BDB_HIER)) || \
728 (SLAPD_HDB == SLAPD_MOD_DYNAMIC && defined(BDB_HIER))
730 /* conditionally define the init_module() function */
732 SLAP_BACKEND_INIT_MODULE( hdb )
733 #else /* !BDB_HIER */
734 SLAP_BACKEND_INIT_MODULE( bdb )
735 #endif /* !BDB_HIER */
737 #endif /* SLAPD_[BH]DB == SLAPD_MOD_DYNAMIC */