meta_back_is_candidate(
struct berval *nsuffix,
int suffixscope,
+ BerVarray subtree_exclude,
struct berval *ndn,
int scope )
{
if ( dnIsSuffix( ndn, nsuffix ) ) {
+ if ( subtree_exclude ) {
+ int i;
+
+ for ( i = 0; !BER_BVISNULL( &subtree_exclude[ i ] ); i++ ) {
+ if ( dnIsSuffix( ndn, &subtree_exclude[ i ] ) ) {
+ return META_NOT_CANDIDATE;
+ }
+ }
+ }
+
switch ( suffixscope ) {
case LDAP_SCOPE_SUBTREE:
default:
for ( i = 0; i < mi->mi_ntargets; ++i ) {
if ( meta_back_is_candidate( &mi->mi_targets[ i ].mt_nsuffix,
mi->mi_targets[ i ].mt_scope,
+ mi->mi_targets[ i ].mt_subtree_exclude,
ndn, LDAP_SCOPE_BASE ) )
{
if ( candidate == META_TARGET_NONE ) {