From fc6f282b22e7b771627a1f6f3b099fd70c9bbd09 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Mon, 10 Dec 2007 19:10:39 +0000 Subject: [PATCH] Fixed slapd replication of dSAOperation attributes (ITS#5268) --- CHANGES | 1 + servers/slapd/overlays/syncprov.c | 6 ++++++ servers/slapd/result.c | 14 +++++++++----- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index ec2ea4513b..897b52890d 100644 --- 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) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 0a443bd9a1..45ae81a7f9 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -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 )) { diff --git a/servers/slapd/result.c b/servers/slapd/result.c index eccc035832..0afad284eb 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -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; -- 2.39.5