# define SLAP_BDB_ALLOW_DIRTY_READ
#endif
-#define bdb_cf_oc BDB_SYMBOL(cf_oc)
#define bdb_cf_gen BDB_SYMBOL(cf_gen)
#define bdb_cf_cleanup BDB_SYMBOL(cf_cleanup)
#define bdb_checkpoint BDB_SYMBOL(checkpoint)
#define bdb_online_index BDB_SYMBOL(online_index)
-static ObjectClass *bdb_oc;
-
static ConfigDriver bdb_cf_gen;
enum {
"olcDbNoSync $ olcDbDirtyRead $ olcDbIDLcacheSize $ "
"olcDbIndex $ olcDbLinearIndex $ olcDbLockDetect $ "
"olcDbMode $ olcDbSearchStack $ olcDbShmKey ) )",
- Cft_Database, &bdb_oc, bdbcfg },
+ Cft_Database, bdbcfg },
{ NULL, 0, NULL }
};
-static int
-bdb_cf_oc(ConfigArgs *c)
-{
- if ( c->op == SLAP_CONFIG_EMIT ) {
- value_add_one( &c->rvalue_vals, &bdb_oc->soc_cname );
- return 0;
- }
- return 1;
-}
-
static slap_verbmasks bdb_lockd[] = {
{ BER_BVC("default"), DB_LOCK_DEFAULT },
{ BER_BVC("oldest"), DB_LOCK_OLDEST },
static AttributeDescription *cfAd_backend, *cfAd_database, *cfAd_overlay,
*cfAd_include;
-static ObjectClass *cfOc_schema, *cfOc_global, *cfOc_backend, *cfOc_database,
- *cfOc_include, *cfOc_overlay, *cfOc_module;
-
static ConfigFile cf_prv, *cfn = &cf_prv;
static Avlnode *CfOcTree;
"olcTLSCertificateKeyFile $ olcTLSCipherSuite $ olcTLSCRLCheck $ "
"olcTLSRandFile $ olcTLSVerifyClient $ "
"olcObjectIdentifier $ olcAttributeTypes $ olcObjectClasses $ "
- "olcDitContentRules ) )", Cft_Global, &cfOc_global },
+ "olcDitContentRules ) )", Cft_Global },
{ "( OLcfgGlOc:3 "
"NAME 'olcSchemaConfig' "
"DESC 'OpenLDAP schema object' "
"SUP olcConfig STRUCTURAL "
"MAY ( cn $ olcObjectIdentifier $ olcAttributeTypes $ "
"olcObjectClasses $ olcDitContentRules ) )",
- Cft_Schema, &cfOc_schema, NULL, cfAddSchema },
+ Cft_Schema, NULL, cfAddSchema },
{ "( OLcfgGlOc:4 "
"NAME 'olcBackendConfig' "
"DESC 'OpenLDAP Backend-specific options' "
"SUP olcConfig STRUCTURAL "
- "MUST olcBackend )", Cft_Backend, &cfOc_backend, NULL, cfAddBackend },
+ "MUST olcBackend )", Cft_Backend, NULL, cfAddBackend },
{ "( OLcfgGlOc:5 "
"NAME 'olcDatabaseConfig' "
"DESC 'OpenLDAP Database-specific options' "
"olcReplogFile $ olcRequires $ olcRestrict $ olcRootDN $ olcRootPW $ "
"olcSchemaDN $ olcSecurity $ olcSizeLimit $ olcSyncrepl $ "
"olcTimeLimit $ olcUpdateDN $ olcUpdateRef ) )",
- Cft_Database, &cfOc_database, NULL, cfAddDatabase },
+ Cft_Database, NULL, cfAddDatabase },
{ "( OLcfgGlOc:6 "
"NAME 'olcOverlayConfig' "
"DESC 'OpenLDAP Overlay-specific options' "
"SUP olcConfig STRUCTURAL "
- "MUST olcOverlay )", Cft_Overlay, &cfOc_overlay, NULL, cfAddOverlay },
+ "MUST olcOverlay )", Cft_Overlay, NULL, cfAddOverlay },
{ "( OLcfgGlOc:7 "
"NAME 'olcIncludeFile' "
"DESC 'OpenLDAP configuration include file' "
"SUP olcConfig STRUCTURAL "
"MUST olcInclude "
"MAY ( cn $ olcRootDSE ) )",
- Cft_Include, &cfOc_include, NULL, cfAddInclude },
+ Cft_Include, NULL, cfAddInclude },
#ifdef SLAPD_MODULES
{ "( OLcfgGlOc:8 "
"NAME 'olcModuleList' "
"DESC 'OpenLDAP dynamic module info' "
"SUP olcConfig STRUCTURAL "
"MUST ( olcModulePath $ olcModuleLoad ) "
- "MAY cn )", Cft_Module, &cfOc_module, NULL, cfAddModule },
+ "MAY cn )", Cft_Module, NULL, cfAddModule },
#endif
{ NULL, 0, NULL }
};
for (i=0; ocs[i].co_def; i++) {
if ( ocs[i].co_oc ) {
- ocs[i].co_name = &((*ocs[i].co_oc)->soc_cname);
+ ocs[i].co_name = &ocs[i].co_oc->soc_cname;
if ( !ocs[i].co_table )
ocs[i].co_table = ct;
avl_insert( &CfOcTree, &ocs[i], CfOc_cmp, avl_dup_error );
int i, j;
for (i=0; i<nocs; i++) {
- if ( (*colst[i]->co_oc)->soc_required ) {
- AttributeType **at = (*colst[i]->co_oc)->soc_required;
+ if ( colst[i]->co_oc->soc_required ) {
+ AttributeType **at = colst[i]->co_oc->soc_required;
for (j=0; at[j]; j++) {
for (a=e->e_attrs, prev=&e->e_attrs; a;
prev = &(*prev)->a_next, a=a->a_next) {
}
}
}
- if ( (*colst[i]->co_oc)->soc_allowed ) {
- AttributeType **at = (*colst[i]->co_oc)->soc_allowed;
+ if ( colst[i]->co_oc->soc_allowed ) {
+ AttributeType **at = colst[i]->co_oc->soc_allowed;
for (j=0; at[j]; j++) {
for (a=e->e_attrs, prev=&e->e_attrs; a;
prev = &(*prev)->a_next, a=a->a_next) {
val.bv_len = rdn->bv_len - (val.bv_val - rdn->bv_val);
attr_merge_normalize_one(e, ad, &val, NULL );
- oc = *main->co_oc;
+ oc = main->co_oc;
if ( oc->soc_required )
config_build_attrs( e, oc->soc_required, ad, main->co_table, c );
config_build_attrs( e, oc->soc_allowed, ad, main->co_table, c );
if ( extra ) {
- oc = *extra->co_oc;
+ oc = extra->co_oc;
if ( oc->soc_required )
config_build_attrs( e, oc->soc_required, ad, main->co_table, c );
/* create root of tree */
rdn = config_rdn;
c.private = cfb->cb_config;
+ c.be = frontendDB;
e = config_build_entry( op, &rs, NULL, &c, &rdn, &CFOC_GLOBAL, NULL );
ce = e->e_private;
cfb->cb_root = ce;