From: Pierangelo Masarati Date: Sat, 2 Dec 2006 10:42:42 +0000 (+0000) Subject: complain if instantiated outside of a database definition X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~424 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19dabd2fa83ea80ff60aaafe977e2bec54beb6b1;p=thirdparty%2Fopenldap.git complain if instantiated outside of a database definition --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 0050979217..4d3875b1f3 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2493,6 +2493,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 );