From: Pierangelo Masarati Date: Mon, 8 Sep 2008 12:16:05 +0000 (+0000) Subject: always re-test filter after merging local and remote entries (ITS#5679) X-Git-Tag: ACLCHECK_0~1370 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f7679377f997a2fdcbfe18a27b8a8a2bc36a6e5b;p=openldap always re-test filter after merging local and remote entries (ITS#5679) --- diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c index 7f91cff5e5..555284ec8b 100644 --- a/servers/slapd/overlays/translucent.c +++ b/servers/slapd/overlays/translucent.c @@ -663,6 +663,7 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) { Entry *le, *re; Attribute *a, *ax, *an, *as = NULL; int rc; + int test_f = 0; tc = op->o_callback->sc_private; @@ -715,6 +716,7 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) { Entry *tmp = entry_dup( re ); be_entry_release_r( op, re ); re = tmp; + test_f = 1; } } else { /* Else we have remote, get local */ @@ -795,7 +797,16 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) { /* send it now */ rs->sr_entry = re; rs->sr_flags |= REP_ENTRY_MUSTBEFREED; - rc = SLAP_CB_CONTINUE; + if ( test_f ) { + rc = test_filter( op, rs->sr_entry, tc->orig ); + if ( rc == LDAP_COMPARE_TRUE ) { + rc = SLAP_CB_CONTINUE; + } else { + rc = 0; + } + } else { + rc = SLAP_CB_CONTINUE; + } } } else if ( le ) { /* Only a local entry: remote was deleted