]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
complain if instantiated outside of a database definition
authorPierangelo Masarati <ando@openldap.org>
Sat, 2 Dec 2006 10:42:42 +0000 (10:42 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 2 Dec 2006 10:42:42 +0000 (10:42 +0000)
servers/slapd/overlays/syncprov.c

index 0050979217b89dc666887c4f7d5f72548f27dbec..4d3875b1f3a3231e4c34fc3ceb57447583bde2ed 100644 (file)
@@ -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 );