From 196fd6308d3a522a6a9ec7fbd8fcc38264062f5a Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 26 Jan 2007 23:03:46 +0000 Subject: [PATCH] do not allow back-meta with no targets --- servers/slapd/back-meta/init.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 ]; -- 2.39.5