]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/init.c
rework op/rs structures to deal with opeartional attributes
[openldap] / servers / slapd / back-ldbm / init.c
index 993d85acbf3aa245ef96f31d1659914aa8323d5b..eb5a5afc58d690c58752b8273d3b0c686e636d4c 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2003 The OpenLDAP Foundation.
+ * Copyright 1998-2004 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 #include "slap.h"
 #include "back-ldbm.h"
 
-#ifdef SLAPD_LDBM_DYNAMIC
+#if SLAPD_LDBM == SLAPD_MOD_DYNAMIC
 
 int init_module(int argc, char *argv[]) {
     BackendInfo bi;
@@ -37,7 +37,7 @@ int init_module(int argc, char *argv[]) {
     return 0;
 }
 
-#endif /* SLAPD_LDBM_DYNAMIC */
+#endif /* SLAPD_LDBM */
 
 int
 ldbm_back_initialize(
@@ -52,6 +52,14 @@ ldbm_back_initialize(
 
        bi->bi_controls = controls;
 
+       bi->bi_flags |= 
+               SLAP_BFLAG_INCREMENT |
+#ifdef LDBM_SUBENTRIES
+               SLAP_BFLAG_SUBENTRIES |
+#endif
+               SLAP_BFLAG_ALIASES |
+               SLAP_BFLAG_REFERRALS;
+
        bi->bi_open = ldbm_back_open;
        bi->bi_config = NULL;
        bi->bi_close = ldbm_back_close;
@@ -140,15 +148,6 @@ ldbm_back_db_init(
 {
        struct ldbminfo *li;
 
-       /* indicate system schema supported */
-       be->be_flags |= 
-               SLAP_BFLAG_INCREMENT |
-#ifdef LDBM_SUBENTRIES
-               SLAP_BFLAG_SUBENTRIES |
-#endif
-               SLAP_BFLAG_ALIASES |
-               SLAP_BFLAG_REFERRALS;
-
        /* allocate backend-database-specific stuff */
        li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) );