]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/syncprov.c
trim listed modules
[openldap] / servers / slapd / overlays / syncprov.c
index 0050979217b89dc666887c4f7d5f72548f27dbec..278820284197440477f27635b966d65cd42a6bf7 100644 (file)
@@ -2,7 +2,7 @@
 /* syncprov.c - syncrepl provider */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2004-2006 The OpenLDAP Foundation.
+ * Copyright 2004-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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 );