Skip to content
Snippets Groups Projects
Commit d804be69 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

Complain if syncprov is instantiated outside of a database definition

parent 11c5f31b
No related branches found
No related tags found
No related merge requests found
......@@ -2474,6 +2474,13 @@ syncprov_db_init(
slap_overinst *on = (slap_overinst *)be->bd_info;
syncprov_info_t *si;
if ( SLAP_ISGLOBALOVERLAY( be ) ) {
Debug( LDAP_DEBUG_ANY,
"syncprov must be instantiated within a database.\n",
0, 0, 0 );
return 1;
}
si = ch_calloc(1, sizeof(syncprov_info_t));
on->on_bi.bi_private = si;
ldap_pvt_thread_mutex_init( &si->si_csn_mutex );
......
......@@ -1746,6 +1746,7 @@ struct slap_backend_db {
#define SLAP_NOLASTMOD(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_NOLASTMOD)
#define SLAP_LASTMOD(be) (!SLAP_NOLASTMOD(be))
#define SLAP_ISOVERLAY(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_OVERLAY)
#define SLAP_ISGLOBALOVERLAY(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_GLOBAL_OVERLAY)
#define SLAP_NO_SCHEMA_CHECK(be) \
(SLAP_DBFLAGS(be) & SLAP_DBFLAG_NO_SCHEMA_CHECK)
#define SLAP_GLUE_INSTANCE(be) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment