mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
always re-test filter after merging local and remote entries (ITS#5679)
This commit is contained in:
parent
0009def716
commit
f7679377f9
1 changed files with 12 additions and 1 deletions
|
|
@ -663,6 +663,7 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) {
|
||||||
Entry *le, *re;
|
Entry *le, *re;
|
||||||
Attribute *a, *ax, *an, *as = NULL;
|
Attribute *a, *ax, *an, *as = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
|
int test_f = 0;
|
||||||
|
|
||||||
tc = op->o_callback->sc_private;
|
tc = op->o_callback->sc_private;
|
||||||
|
|
||||||
|
|
@ -715,6 +716,7 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) {
|
||||||
Entry *tmp = entry_dup( re );
|
Entry *tmp = entry_dup( re );
|
||||||
be_entry_release_r( op, re );
|
be_entry_release_r( op, re );
|
||||||
re = tmp;
|
re = tmp;
|
||||||
|
test_f = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Else we have remote, get local */
|
/* Else we have remote, get local */
|
||||||
|
|
@ -795,7 +797,16 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) {
|
||||||
/* send it now */
|
/* send it now */
|
||||||
rs->sr_entry = re;
|
rs->sr_entry = re;
|
||||||
rs->sr_flags |= REP_ENTRY_MUSTBEFREED;
|
rs->sr_flags |= REP_ENTRY_MUSTBEFREED;
|
||||||
|
if ( test_f ) {
|
||||||
|
rc = test_filter( op, rs->sr_entry, tc->orig );
|
||||||
|
if ( rc == LDAP_COMPARE_TRUE ) {
|
||||||
rc = SLAP_CB_CONTINUE;
|
rc = SLAP_CB_CONTINUE;
|
||||||
|
} else {
|
||||||
|
rc = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
rc = SLAP_CB_CONTINUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if ( le ) {
|
} else if ( le ) {
|
||||||
/* Only a local entry: remote was deleted
|
/* Only a local entry: remote was deleted
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue