]> git.sur5r.net Git - openldap/blob - servers/slapd/back-bdb/init.c
Added overlay objects
[openldap] / servers / slapd / back-bdb / init.c
1 /* init.c - initialize bdb backend */
2 /* $OpenLDAP$ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4  *
5  * Copyright 2000-2005 The OpenLDAP Foundation.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted only as authorized by the OpenLDAP
10  * Public License.
11  *
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>.
15  */
16
17 #include "portable.h"
18
19 #include <stdio.h>
20 #include <ac/string.h>
21 #include <ac/unistd.h>
22 #include <ac/stdlib.h>
23
24 #include "back-bdb.h"
25 #include <lutil.h>
26 #include <ldap_rq.h>
27
28 static const struct bdbi_database {
29         char *file;
30         char *name;
31         int type;
32         int flags;
33 } bdbi_databases[] = {
34         { "id2entry" BDB_SUFFIX, "id2entry", DB_BTREE, 0 },
35         { "dn2id" BDB_SUFFIX, "dn2id", DB_BTREE, 0 },
36         { NULL, NULL, 0, 0 }
37 };
38
39 struct berval bdb_uuid = BER_BVNULL;
40
41 typedef void * db_malloc(size_t);
42 typedef void * db_realloc(void *, size_t);
43
44 static int
45 bdb_db_init( BackendDB *be )
46 {
47         struct bdb_info *bdb;
48
49         Debug( LDAP_DEBUG_ANY,
50                 LDAP_XSTRING(bdb_db_init) ": Initializing "
51                 BDB_UCTYPE " database\n", 0, 0, 0 );
52
53         /* allocate backend-database-specific stuff */
54         bdb = (struct bdb_info *) ch_calloc( 1, sizeof(struct bdb_info) );
55
56         /* DBEnv parameters */
57         bdb->bi_dbenv_home = ch_strdup( SLAPD_DEFAULT_DB_DIR );
58         bdb->bi_dbenv_xflags = 0;
59         bdb->bi_dbenv_mode = SLAPD_DEFAULT_DB_MODE;
60
61         bdb->bi_cache.c_maxsize = DEFAULT_CACHE_SIZE;
62
63         bdb->bi_lock_detect = DB_LOCK_DEFAULT;
64         bdb->bi_search_stack_depth = DEFAULT_SEARCH_STACK_DEPTH;
65         bdb->bi_search_stack = NULL;
66
67         ldap_pvt_thread_mutex_init( &bdb->bi_database_mutex );
68         ldap_pvt_thread_mutex_init( &bdb->bi_lastid_mutex );
69         ldap_pvt_thread_mutex_init( &bdb->bi_cache.lru_mutex );
70         ldap_pvt_thread_mutex_init( &bdb->bi_cache.c_dntree.bei_kids_mutex );
71         ldap_pvt_thread_rdwr_init ( &bdb->bi_cache.c_rwlock );
72
73         be->be_private = bdb;
74
75         return 0;
76 }
77
78 static void *
79 bdb_checkpoint( void *ctx, void *arg )
80 {
81         struct re_s *rtask = arg;
82         struct bdb_info *bdb = rtask->arg;
83         
84         TXN_CHECKPOINT( bdb->bi_dbenv, bdb->bi_txn_cp_kbyte,
85                 bdb->bi_txn_cp_min, 0 );
86         return NULL;
87 }
88
89 static int
90 bdb_db_open( BackendDB *be )
91 {
92         int rc, i;
93         struct bdb_info *bdb = (struct bdb_info *) be->be_private;
94         u_int32_t flags;
95 #ifdef HAVE_EBCDIC
96         char path[MAXPATHLEN];
97 #endif
98
99         Debug( LDAP_DEBUG_ARGS,
100                 "bdb_db_open: %s\n",
101                 be->be_suffix[0].bv_val, 0, 0 );
102
103 #ifndef BDB_MULTIPLE_SUFFIXES
104         if ( be->be_suffix[1].bv_val ) {
105         Debug( LDAP_DEBUG_ANY,
106                 "bdb_db_open: only one suffix allowed\n", 0, 0, 0 );
107                 return -1;
108         }
109 #endif
110         /* we should check existance of dbenv_home and db_directory */
111
112         rc = db_env_create( &bdb->bi_dbenv, 0 );
113         if( rc != 0 ) {
114                 Debug( LDAP_DEBUG_ANY,
115                         "bdb_db_open: db_env_create failed: %s (%d)\n",
116                         db_strerror(rc), rc, 0 );
117                 return rc;
118         }
119
120         flags = DB_INIT_MPOOL | DB_THREAD | DB_CREATE;
121
122         if ( !( slapMode & SLAP_TOOL_QUICK ))
123                 flags |= DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_TXN;
124         
125 #if 0
126         /* Never do automatic recovery, must perform it manually.
127          * Otherwise restarting with gentlehup will corrupt the
128          * database.
129          */
130         if( !(slapMode & SLAP_TOOL_MODE) ) flags |= DB_RECOVER;
131 #endif
132
133         /* If a key was set, use shared memory for the BDB environment */
134         if ( bdb->bi_shm_key ) {
135                 bdb->bi_dbenv->set_shm_key( bdb->bi_dbenv, bdb->bi_shm_key );
136                 flags |= DB_SYSTEM_MEM;
137         }
138
139         bdb->bi_dbenv->set_errpfx( bdb->bi_dbenv, be->be_suffix[0].bv_val );
140         bdb->bi_dbenv->set_errcall( bdb->bi_dbenv, bdb_errcall );
141         bdb->bi_dbenv->set_lk_detect( bdb->bi_dbenv, bdb->bi_lock_detect );
142
143         /* One long-lived TXN per thread, two TXNs per write op */
144         bdb->bi_dbenv->set_tx_max( bdb->bi_dbenv, connection_pool_max * 3 );
145
146 #ifdef SLAP_ZONE_ALLOC
147         if ( bdb->bi_cache.c_maxsize ) {
148                 bdb->bi_cache.c_zctx = slap_zn_mem_create(
149                                                                 SLAP_ZONE_INITSIZE,
150                                                                 SLAP_ZONE_MAXSIZE,
151                                                                 SLAP_ZONE_DELTA,
152                                                                 SLAP_ZONE_SIZE);
153         }
154 #endif
155
156         if ( bdb->bi_idl_cache_max_size ) {
157                 bdb->bi_idl_tree = NULL;
158                 ldap_pvt_thread_rdwr_init( &bdb->bi_idl_tree_rwlock );
159                 ldap_pvt_thread_mutex_init( &bdb->bi_idl_tree_lrulock );
160                 bdb->bi_idl_cache_size = 0;
161         }
162
163 #ifdef BDB_SUBDIRS
164         {
165                 char dir[MAXPATHLEN], *ptr;
166                 
167                 if (bdb->bi_dbenv_home[0] == '.') {
168                         /* If home is a relative path, relative subdirs
169                          * are just concat'd by BDB. We don't want the
170                          * path to be concat'd twice, e.g.
171                          * ./test-db/./test-db/tmp
172                          */
173                         ptr = dir;
174                 } else {
175                         ptr = lutil_strcopy( dir, bdb->bi_dbenv_home );
176                         *ptr++ = LDAP_DIRSEP[0];
177 #ifdef HAVE_EBCDIC
178                         __atoe( dir );
179 #endif
180                 }
181
182                 strcpy( ptr, BDB_TMP_SUBDIR );
183 #ifdef HAVE_EBCDIC
184                 __atoe( ptr );
185 #endif
186                 rc = bdb->bi_dbenv->set_tmp_dir( bdb->bi_dbenv, dir );
187                 if( rc != 0 ) {
188                         Debug( LDAP_DEBUG_ANY,
189                                 "bdb_db_open: set_tmp_dir(%s) failed: %s (%d)\n",
190                                 dir, db_strerror(rc), rc );
191                         return rc;
192                 }
193
194                 strcpy( ptr, BDB_LG_SUBDIR );
195 #ifdef HAVE_EBCDIC
196                 __atoe( ptr );
197 #endif
198                 rc = bdb->bi_dbenv->set_lg_dir( bdb->bi_dbenv, dir );
199                 if( rc != 0 ) {
200                         Debug( LDAP_DEBUG_ANY,
201                                 "bdb_db_open: set_lg_dir(%s) failed: %s (%d)\n",
202                                 dir, db_strerror(rc), rc );
203                         return rc;
204                 }
205
206                 strcpy( ptr, BDB_DATA_SUBDIR );
207 #ifdef HAVE_EBCDIC
208                 __atoe( ptr );
209 #endif
210                 rc = bdb->bi_dbenv->set_data_dir( bdb->bi_dbenv, dir );
211                 if( rc != 0 ) {
212                         Debug( LDAP_DEBUG_ANY,
213                                 "bdb_db_open: set_data_dir(%s) failed: %s (%d)\n",
214                                 dir, db_strerror(rc), rc );
215                         return rc;
216                 }
217         }
218 #endif
219
220         if( bdb->bi_dbenv_xflags != 0 ) {
221                 rc = bdb->bi_dbenv->set_flags( bdb->bi_dbenv,
222                         bdb->bi_dbenv_xflags, 1);
223                 if( rc != 0 ) {
224                         Debug( LDAP_DEBUG_ANY,
225                                 "bdb_db_open: dbenv_set_flags failed: %s (%d)\n",
226                                 db_strerror(rc), rc, 0 );
227                         return rc;
228                 }
229         }
230
231         Debug( LDAP_DEBUG_TRACE,
232                 "bdb_db_open: dbenv_open(%s)\n",
233                 bdb->bi_dbenv_home, 0, 0);
234
235 #ifdef HAVE_EBCDIC
236         strcpy( path, bdb->bi_dbenv_home );
237         __atoe( path );
238         rc = bdb->bi_dbenv->open( bdb->bi_dbenv,
239                 path,
240                 flags,
241                 bdb->bi_dbenv_mode );
242 #else
243         rc = bdb->bi_dbenv->open( bdb->bi_dbenv,
244                 bdb->bi_dbenv_home,
245                 flags,
246                 bdb->bi_dbenv_mode );
247 #endif
248         if( rc != 0 ) {
249                 Debug( LDAP_DEBUG_ANY,
250                         "bdb_db_open: dbenv_open failed: %s (%d)\n",
251                         db_strerror(rc), rc, 0 );
252                 return rc;
253         }
254
255         flags = DB_THREAD | bdb->bi_db_opflags;
256
257 #ifdef DB_AUTO_COMMIT
258         if ( !( slapMode & SLAP_TOOL_QUICK ))
259                 flags |= DB_AUTO_COMMIT;
260 #endif
261
262         bdb->bi_databases = (struct bdb_db_info **) ch_malloc(
263                 BDB_INDICES * sizeof(struct bdb_db_info *) );
264
265         /* open (and create) main database */
266         for( i = 0; bdbi_databases[i].name; i++ ) {
267                 struct bdb_db_info *db;
268
269                 db = (struct bdb_db_info *) ch_calloc(1, sizeof(struct bdb_db_info));
270
271                 rc = db_create( &db->bdi_db, bdb->bi_dbenv, 0 );
272                 if( rc != 0 ) {
273                         Debug( LDAP_DEBUG_ANY,
274                                 "bdb_db_open: db_create(%s) failed: %s (%d)\n",
275                                 bdb->bi_dbenv_home, db_strerror(rc), rc );
276                         return rc;
277                 }
278
279                 if( i == BDB_ID2ENTRY ) {
280                         rc = db->bdi_db->set_pagesize( db->bdi_db,
281                                 BDB_ID2ENTRY_PAGESIZE );
282                         if ( slapMode & SLAP_TOOL_READMAIN ) {
283                                 flags |= DB_RDONLY;
284                         } else {
285                                 flags |= DB_CREATE;
286                         }
287                 } else {
288                         rc = db->bdi_db->set_flags( db->bdi_db, 
289                                 DB_DUP | DB_DUPSORT );
290 #ifndef BDB_HIER
291                         if ( slapMode & SLAP_TOOL_READONLY ) {
292                                 flags |= DB_RDONLY;
293                         } else {
294                                 flags |= DB_CREATE;
295                         }
296 #else
297                         if ( slapMode & (SLAP_TOOL_READONLY|SLAP_TOOL_READMAIN) ) {
298                                 flags |= DB_RDONLY;
299                         } else {
300                                 flags |= DB_CREATE;
301                         }
302 #endif
303                         rc = db->bdi_db->set_pagesize( db->bdi_db,
304                                 BDB_PAGESIZE );
305                 }
306
307 #ifdef HAVE_EBCDIC
308                 strcpy( path, bdbi_databases[i].file );
309                 __atoe( path );
310                 rc = DB_OPEN( db->bdi_db,
311                         path,
312                 /*      bdbi_databases[i].name, */ NULL,
313                         bdbi_databases[i].type,
314                         bdbi_databases[i].flags | flags,
315                         bdb->bi_dbenv_mode );
316 #else
317                 rc = DB_OPEN( db->bdi_db,
318                         bdbi_databases[i].file,
319                 /*      bdbi_databases[i].name, */ NULL,
320                         bdbi_databases[i].type,
321                         bdbi_databases[i].flags | flags,
322                         bdb->bi_dbenv_mode );
323 #endif
324
325                 if ( rc != 0 ) {
326                         char    buf[SLAP_TEXT_BUFLEN];
327
328                         snprintf( buf, sizeof(buf), "%s/%s", 
329                                 bdb->bi_dbenv_home, bdbi_databases[i].file );
330                         Debug( LDAP_DEBUG_ANY,
331                                 "bdb_db_open: db_open(%s) failed: %s (%d)\n",
332                                 buf, db_strerror(rc), rc );
333                         return rc;
334                 }
335
336                 flags &= ~(DB_CREATE | DB_RDONLY);
337                 db->bdi_name = bdbi_databases[i].name;
338                 bdb->bi_databases[i] = db;
339         }
340
341         bdb->bi_databases[i] = NULL;
342         bdb->bi_ndatabases = i;
343
344         /* get nextid */
345         rc = bdb_last_id( be, NULL );
346         if( rc != 0 ) {
347                 Debug( LDAP_DEBUG_ANY,
348                         "bdb_db_open: last_id(%s) failed: %s (%d)\n",
349                         bdb->bi_dbenv_home, db_strerror(rc), rc );
350                 return rc;
351         }
352
353         if ( !( slapMode & SLAP_TOOL_QUICK )) {
354                 XLOCK_ID(bdb->bi_dbenv, &bdb->bi_cache.c_locker);
355         }
356
357         /* If we're in server mode and time-based checkpointing is enabled,
358          * submit a task to perform periodic checkpoints.
359          */
360         if ( slapMode & SLAP_SERVER_MODE && bdb->bi_txn_cp &&
361                 bdb->bi_txn_cp_min )  {
362                 ldap_pvt_thread_mutex_lock( &slapd_rq.rq_mutex );
363                 ldap_pvt_runqueue_insert( &slapd_rq, bdb->bi_txn_cp_min*60,
364                         bdb_checkpoint, bdb );
365                 ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex );
366         }
367
368         return 0;
369 }
370
371 static int
372 bdb_db_close( BackendDB *be )
373 {
374         int rc;
375         struct bdb_info *bdb = (struct bdb_info *) be->be_private;
376         struct bdb_db_info *db;
377         bdb_idl_cache_entry_t *entry, *next_entry;
378
379         while( bdb->bi_ndatabases-- ) {
380                 db = bdb->bi_databases[bdb->bi_ndatabases];
381                 rc = db->bdi_db->close( db->bdi_db, 0 );
382                 /* Lower numbered names are not strdup'd */
383                 if( bdb->bi_ndatabases >= BDB_NDB )
384                         free( db->bdi_name );
385                 free( db );
386         }
387         free( bdb->bi_databases );
388         bdb_attr_index_destroy( bdb->bi_attrs );
389
390         bdb_cache_release_all (&bdb->bi_cache);
391
392         if ( bdb->bi_idl_cache_max_size ) {
393                 ldap_pvt_thread_rdwr_wlock ( &bdb->bi_idl_tree_rwlock );
394                 avl_free( bdb->bi_idl_tree, NULL );
395                 entry = bdb->bi_idl_lru_head;
396                 while ( entry != NULL ) {
397                         next_entry = entry->idl_lru_next;
398                         if ( entry->idl )
399                                 free( entry->idl );
400                         free( entry->kstr.bv_val );
401                         free( entry );
402                         entry = next_entry;
403                 }
404                 ldap_pvt_thread_rdwr_wunlock ( &bdb->bi_idl_tree_rwlock );
405         }
406
407         if ( !( slapMode & SLAP_TOOL_QUICK )) {
408                 XLOCK_ID_FREE(bdb->bi_dbenv, bdb->bi_cache.c_locker);
409         }
410
411         return 0;
412 }
413
414 static int
415 bdb_db_destroy( BackendDB *be )
416 {
417         int rc;
418         struct bdb_info *bdb = (struct bdb_info *) be->be_private;
419
420         /* close db environment */
421         if( bdb->bi_dbenv ) {
422                 /* force a checkpoint */
423                 if ( !( slapMode & SLAP_TOOL_QUICK )) {
424                         rc = TXN_CHECKPOINT( bdb->bi_dbenv, 0, 0, DB_FORCE );
425                         if( rc != 0 ) {
426                                 Debug( LDAP_DEBUG_ANY,
427                                         "bdb_db_destroy: txn_checkpoint failed: %s (%d)\n",
428                                         db_strerror(rc), rc, 0 );
429                         }
430                 }
431
432                 rc = bdb->bi_dbenv->close( bdb->bi_dbenv, 0 );
433                 bdb->bi_dbenv = NULL;
434                 if( rc != 0 ) {
435                         Debug( LDAP_DEBUG_ANY,
436                                 "bdb_db_destroy: close failed: %s (%d)\n",
437                                 db_strerror(rc), rc, 0 );
438                         return rc;
439                 }
440         }
441
442         if( bdb->bi_dbenv_home ) ch_free( bdb->bi_dbenv_home );
443
444         ldap_pvt_thread_rdwr_destroy ( &bdb->bi_cache.c_rwlock );
445         ldap_pvt_thread_mutex_destroy( &bdb->bi_cache.lru_mutex );
446         ldap_pvt_thread_mutex_destroy( &bdb->bi_cache.c_dntree.bei_kids_mutex );
447         ldap_pvt_thread_mutex_destroy( &bdb->bi_lastid_mutex );
448         ldap_pvt_thread_mutex_destroy( &bdb->bi_database_mutex );
449         if ( bdb->bi_idl_cache_max_size ) {
450                 ldap_pvt_thread_rdwr_destroy( &bdb->bi_idl_tree_rwlock );
451                 ldap_pvt_thread_mutex_destroy( &bdb->bi_idl_tree_lrulock );
452         }
453
454         ch_free( bdb );
455         be->be_private = NULL;
456
457         return 0;
458 }
459
460 int
461 bdb_back_initialize(
462         BackendInfo     *bi )
463 {
464         static char *controls[] = {
465                 LDAP_CONTROL_ASSERT,
466                 LDAP_CONTROL_MANAGEDSAIT,
467                 LDAP_CONTROL_NOOP,
468                 LDAP_CONTROL_PAGEDRESULTS,
469 #ifdef LDAP_CONTROL_SUBENTRIES
470                 LDAP_CONTROL_SUBENTRIES,
471 #endif
472 #ifdef LDAP_CONTROL_X_PERMISSIVE_MODIFY
473                 LDAP_CONTROL_X_PERMISSIVE_MODIFY,
474 #endif
475                 NULL
476         };
477
478         /* initialize the underlying database system */
479         Debug( LDAP_DEBUG_TRACE,
480                 LDAP_XSTRING(bdb_back_initialize) ": initialize " 
481                 BDB_UCTYPE " backend\n", 0, 0, 0 );
482
483         bi->bi_flags |=
484                 SLAP_BFLAG_INCREMENT |
485 #ifdef BDB_SUBENTRIES
486                 SLAP_BFLAG_SUBENTRIES |
487 #endif
488                 SLAP_BFLAG_ALIASES |
489                 SLAP_BFLAG_REFERRALS;
490
491         bi->bi_controls = controls;
492
493         {       /* version check */
494                 int major, minor, patch, ver;
495                 char *version = db_version( &major, &minor, &patch );
496 #ifdef HAVE_EBCDIC
497                 char v2[1024];
498
499                 /* All our stdio does an ASCII to EBCDIC conversion on
500                  * the output. Strings from the BDB library are already
501                  * in EBCDIC; we have to go back and forth...
502                  */
503                 strcpy( v2, version );
504                 __etoa( v2 );
505                 version = v2;
506 #endif
507
508                 ver = (major << 24) | (minor << 16) | patch;
509                 if( ver < DB_VERSION_FULL )
510                 {
511                         Debug( LDAP_DEBUG_ANY,
512                                 LDAP_XSTRING(bdb_back_initialize) ": "
513                                 "BDB library version mismatch:"
514                                 " expected " DB_VERSION_STRING ","
515                                 " got %s\n", version, 0, 0 );
516                 }
517
518                 Debug( LDAP_DEBUG_ANY, LDAP_XSTRING(bdb_back_initialize)
519                         ": %s\n", version, 0, 0 );
520         }
521
522         db_env_set_func_free( ber_memfree );
523         db_env_set_func_malloc( (db_malloc *)ber_memalloc );
524         db_env_set_func_realloc( (db_realloc *)ber_memrealloc );
525 #ifndef NO_THREAD
526         /* This is a no-op on a NO_THREAD build. Leave the default
527          * alone so that BDB will sleep on interprocess conflicts.
528          */
529         db_env_set_func_yield( ldap_pvt_thread_yield );
530 #endif
531
532         {
533                 static char uuidbuf[ LDAP_LUTIL_UUIDSTR_BUFSIZE ];
534
535                 bdb_uuid.bv_len = lutil_uuidstr( uuidbuf, sizeof( uuidbuf ));
536                 bdb_uuid.bv_val = uuidbuf;
537         }
538
539         bi->bi_open = 0;
540         bi->bi_close = 0;
541         bi->bi_config = 0;
542         bi->bi_destroy = 0;
543
544         bi->bi_db_init = bdb_db_init;
545         bi->bi_db_config = bdb_db_config;
546         bi->bi_db_open = bdb_db_open;
547         bi->bi_db_close = bdb_db_close;
548         bi->bi_db_destroy = bdb_db_destroy;
549
550         bi->bi_op_add = bdb_add;
551         bi->bi_op_bind = bdb_bind;
552         bi->bi_op_compare = bdb_compare;
553         bi->bi_op_delete = bdb_delete;
554         bi->bi_op_modify = bdb_modify;
555         bi->bi_op_modrdn = bdb_modrdn;
556         bi->bi_op_search = bdb_search;
557
558         bi->bi_op_unbind = 0;
559
560         bi->bi_extended = bdb_extended;
561
562         bi->bi_chk_referrals = bdb_referrals;
563         bi->bi_operational = bdb_operational;
564         bi->bi_has_subordinates = bdb_hasSubordinates;
565         bi->bi_entry_release_rw = bdb_entry_release;
566         bi->bi_entry_get_rw = bdb_entry_get;
567
568         /*
569          * hooks for slap tools
570          */
571         bi->bi_tool_entry_open = bdb_tool_entry_open;
572         bi->bi_tool_entry_close = bdb_tool_entry_close;
573         bi->bi_tool_entry_first = bdb_tool_entry_next;
574         bi->bi_tool_entry_next = bdb_tool_entry_next;
575         bi->bi_tool_entry_get = bdb_tool_entry_get;
576         bi->bi_tool_entry_put = bdb_tool_entry_put;
577         bi->bi_tool_entry_reindex = bdb_tool_entry_reindex;
578         bi->bi_tool_sync = 0;
579         bi->bi_tool_dn2id_get = bdb_tool_dn2id_get;
580         bi->bi_tool_id2entry_get = bdb_tool_id2entry_get;
581         bi->bi_tool_entry_modify = bdb_tool_entry_modify;
582
583         bi->bi_connection_init = 0;
584         bi->bi_connection_destroy = 0;
585
586         return 0;
587 }
588
589 #if     (SLAPD_BDB == SLAPD_MOD_DYNAMIC && !defined(BDB_HIER)) || \
590         (SLAPD_HDB == SLAPD_MOD_DYNAMIC && defined(BDB_HIER))
591
592 /* conditionally define the init_module() function */
593 #ifdef BDB_HIER
594 SLAP_BACKEND_INIT_MODULE( hdb )
595 #else /* !BDB_HIER */
596 SLAP_BACKEND_INIT_MODULE( bdb )
597 #endif /* !BDB_HIER */
598
599 #endif /* SLAPD_[BH]DB == SLAPD_MOD_DYNAMIC */
600