]> git.sur5r.net Git - openldap/commitdiff
ITS#5268 don't replicate dSAOperation attributes unless specifically
authorHoward Chu <hyc@openldap.org>
Sat, 8 Dec 2007 17:44:15 +0000 (17:44 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 8 Dec 2007 17:44:15 +0000 (17:44 +0000)
requested. (It doesn't actually make sense to request them in that
case, but allow it.)

servers/slapd/result.c

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;