]> git.sur5r.net Git - openldap/commitdiff
Fixed slapd replication of dSAOperation attributes (ITS#5268)
authorQuanah Gibson-Mount <quanah@openldap.org>
Mon, 10 Dec 2007 19:10:39 +0000 (19:10 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 10 Dec 2007 19:10:39 +0000 (19:10 +0000)
CHANGES
servers/slapd/overlays/syncprov.c
servers/slapd/result.c

diff --git a/CHANGES b/CHANGES
index ec2ea4513bd43cad7deef4b11ebbd473eba6fb16..897b52890ddca0dae7929c56e05f5c4cf9f024f6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -11,6 +11,7 @@ OpenLDAP 2.4.7 Release (2007/12/01)
        Fixed slapd core schema 'c' definition for RFC4519 (ITS#5236)
        Fixed slapd 3-way Multi-Master Replication (ITS#5238)
        Fixed slapd hash collisions in index slots (ITS#5183)
+       Fixed slapd replication of dSAOperation attributes (ITS#5268)
        Fixed slapadd contextCSN updating (ITS#5225)
        Fixed slapd-bdb/hdb to report and fail on internal errors (ITS#5232)
        Fixed slapd-bdb/hdb dn2entry lock bug (ITS#5257)
index 0a443bd9a16c1411a86c6dae98265e01bbcacd57..45ae81a7f913448aaf498ea61d3689fe7c47b81a 100644 (file)
@@ -2321,6 +2321,12 @@ syncprov_operational(
        slap_overinst           *on = (slap_overinst *)op->o_bd->bd_info;
        syncprov_info_t         *si = (syncprov_info_t *)on->on_bi.bi_private;
 
+       /* This prevents generating unnecessarily; frontend will strip
+        * any statically stored copy.
+        */
+       if ( op->o_sync != SLAP_CONTROL_NONE )
+               return SLAP_CB_CONTINUE;
+
        if ( rs->sr_entry &&
                dn_match( &rs->sr_entry->e_nname, op->o_bd->be_nsuffix )) {
 
index eccc03583288d260ee637f3a370a1628cddf68cb..0afad284eb9bb18b506e7eb506fdef45406b4bb4 100644 (file)
@@ -898,12 +898,16 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                } else {
                        /* specific attrs requested */
                        if ( is_at_operational( desc->ad_type ) ) {
-                               if ( !SLAP_OPATTRS( rs->sr_attr_flags ) &&
-                                       !ad_inlist( desc, rs->sr_attrs ) )
-                               {
-                                       continue;
+                               /* if not explicitly requested */
+                               if ( !ad_inlist( desc, rs->sr_attrs )) {
+                                       /* if not all op attrs requested, skip */
+                                       if ( !SLAP_OPATTRS( rs->sr_attr_flags ))
+                                               continue;
+                                       /* if DSA-specific and replicating, skip */
+                                       if ( op->o_sync != SLAP_CONTROL_NONE &&
+                                               desc->ad_type->sat_usage == LDAP_SCHEMA_DSA_OPERATION )
+                                               continue;
                                }
-
                        } else {
                                if ( !userattrs && !ad_inlist( desc, rs->sr_attrs ) ) {
                                        continue;