From: Pierangelo Masarati Date: Fri, 26 Jan 2007 23:03:46 +0000 (+0000) Subject: do not allow back-meta with no targets X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~126 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=196fd6308d3a522a6a9ec7fbd8fcc38264062f5a;p=openldap do not allow back-meta with no targets --- diff --git a/servers/slapd/back-meta/init.c b/servers/slapd/back-meta/init.c index 496172f798..89f27ad818 100644 --- a/servers/slapd/back-meta/init.c +++ b/servers/slapd/back-meta/init.c @@ -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 ];