Commit 33876e22 authored by Nadezhda Ivanova's avatar Nadezhda Ivanova Committed by Ondřej Kuzník
Browse files

ITS#8859 Allow backends which do not need a database to work

parent d10fc664
......@@ -1702,6 +1702,10 @@ config_generic(ConfigArgs *c) {
c->log, c->cr_msg, c->argv[1] );
return(1);
}
if ( c->bi->bi_flags & SLAP_BFLAG_STANDALONE ) {
c->bi->bi_nDB++;
nbackends++;
}
break;
case CFG_DATABASE:
......@@ -7217,7 +7221,7 @@ config_back_db_open( BackendDB *be, ConfigReply *cr )
}
continue;
}
if (!bi->bi_private) continue;
if ( !bi->bi_private && !(bi->bi_flags & SLAP_BFLAG_STANDALONE) ) continue;
rdn.bv_val = c.log;
rdn.bv_len = snprintf(rdn.bv_val, sizeof( c.log ),
......
......@@ -835,7 +835,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft)
goto done;
}
} else if ( c->bi && !c->be ) {
} else if ( ( c->bi && !c->be ) || ( c->bi && c->bi->bi_flags & SLAP_BFLAG_STANDALONE ) ) {
rc = SLAP_CONF_UNKNOWN;
if ( c->bi->bi_cf_ocs ) {
ct = config_find_keyword( c->bi->bi_cf_ocs->co_table, c );
......
......@@ -2345,6 +2345,7 @@ struct BackendInfo {
#define SLAP_BFLAG_REFERRALS 0x2000U
#define SLAP_BFLAG_SUBENTRIES 0x4000U
#define SLAP_BFLAG_DYNAMIC 0x8000U
#define SLAP_BFLAG_STANDALONE 0x10000U /* started up regardless of whether any databases use it */
/* overlay specific */
#define SLAPO_BFLAG_SINGLE 0x01000000U
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment