]> git.sur5r.net Git - openldap/commitdiff
do not allow back-meta with no targets
authorPierangelo Masarati <ando@openldap.org>
Fri, 26 Jan 2007 23:03:46 +0000 (23:03 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 26 Jan 2007 23:03:46 +0000 (23:03 +0000)
servers/slapd/back-meta/init.c

index 496172f798fff7498b5592a27e2720b118756e69..89f27ad8182ff97736b71c8cdad83bf6f93c66a5 100644 (file)
@@ -138,6 +138,13 @@ meta_back_db_open(
                        not_always_anon_non_prescriptive = 0,
                        rc;
 
+       if ( mi->mi_ntargets == 0 ) {
+               Debug( LDAP_DEBUG_ANY,
+                       "meta_back_db_open: no targets defined\n",
+                       0, 0, 0 );
+               return 1;
+       }
+
        for ( i = 0; i < mi->mi_ntargets; i++ ) {
                slap_bindconf   sb = { BER_BVNULL };
                metatarget_t    *mt = mi->mi_targets[ i ];