]> git.sur5r.net Git - openldap/commitdiff
ITS#5927
authorQuanah Gibson-Mount <quanah@openldap.org>
Wed, 18 Feb 2009 23:54:51 +0000 (23:54 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 18 Feb 2009 23:54:51 +0000 (23:54 +0000)
CHANGES
servers/slapd/overlays/pcache.c

diff --git a/CHANGES b/CHANGES
index 6dc78b000ed809fcc60c2db47e5d41dcd88dea24..a6b5e8e91d16337c9d32faa32621af2d1699d49c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@ OpenLDAP 2.4.15 Engineering
        Fixed slapd corrupt contextCSN (ITS#5947)
        Fixed slapd syncrepl order to match on add/delete (ITS#5954)
        Fixed slapd-bdb/hdb behavior with unallocatable shm (ITS#5956)
+       Fixed slapo-pcache caching invalid entries (ITS#5927)
        Fixed slapo-rwm objectClass preservation (ITS#5760)
        Build Environment
                Fixed tester library linking for windows (ITS#5740)
index 3f317cfc0ce91cf40cfb7ec7d41b30f3677b6a66..adf98104fce3980f88273fe47b4ea972ffb170f2 100644 (file)
@@ -1993,6 +1993,19 @@ pcache_op_cleanup( Operation *op, SlapReply *rs ) {
                                goto over;
                        }
 
+                       /* check for malformed entries: attrs with no values */
+                       {
+                               Attribute *a = e->e_attrs;
+                               for (; a; a=a->a_next) {
+                                       if ( !a->a_numvals ) {
+                                               Debug( pcache_debug, "%s: query not cacheable because of attrs without values in DN \"%s\" (%s)\n",
+                                               op->o_log_prefix, rs->sr_entry->e_name.bv_val,
+                                               a->a_desc->ad_cname.bv_val );
+                                               goto over;
+                                       }
+                               }
+                       }
+
                        if ( si->count < si->max ) {
                                si->count++;
                                e = entry_dup( rs->sr_entry );