]> git.sur5r.net Git - openldap/commitdiff
ITS#5679
authorQuanah Gibson-Mount <quanah@openldap.org>
Mon, 8 Sep 2008 20:54:14 +0000 (20:54 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 8 Sep 2008 20:54:14 +0000 (20:54 +0000)
CHANGES
servers/slapd/overlays/translucent.c

diff --git a/CHANGES b/CHANGES
index 319a37fa4449a66ac38e26bdec5db6a4788d8cbc..ddb7c3ace82d89f816d22a61b8d04bc58a686988 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -33,6 +33,7 @@ OpenLDAP 2.4.12 Engineering
        Fixed slapo-rwm callback cleanup (ITS#5601,ITS#5687)
        Fixed slapo-rwm attr mapping and merging (ITS#5624)
        Fixed slapo-rwm objectClass filtering (ITS#5647)
+       Fixed slapo-translucent filter usage on merged entries (ITS#5679)
        Fixed slapo-unique filter validation (ITS#5581)
        Fixed slapo-unique suffix testing (ITS#5641)
        Build Environment
index 7f91cff5e52d737dace6f5888cbdcea949a5d5b6..555284ec8ba7f1e57751430b7b37698838dc9143 100644 (file)
@@ -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