From: Quanah Gibson-Mount Date: Fri, 1 May 2009 21:19:29 +0000 (+0000) Subject: ITS#6070 X-Git-Tag: OPENLDAP_REL_ENG_2_4_17~115 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=edeaab4f53840b677bd7825a9c0b6622513832dc;p=openldap ITS#6070 --- diff --git a/CHANGES b/CHANGES index 1799e09985..d56548ef31 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,7 @@ OpenLDAP 2.4.17 Engineering Fixed slapd normalization of updated schema attributes (ITS#5540) Fixed slapd pagedresults stacked control with overlays (ITS#6056) Fixed slapd sockets usage on windows (ITS#6039) + Fixed slapo-rwm dn passing (ITS#6070) Added slapo-rwm rwm-drop-unrequested-attrs config option (ITS#6057) Build Environment Added test056-monitor (ITS#5540) diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c index de8da75f3e..93b1ae33b0 100644 --- a/servers/slapd/overlays/rwm.c +++ b/servers/slapd/overlays/rwm.c @@ -847,6 +847,7 @@ rwm_entry_get_rw( Operation *op, struct berval *ndn, SlapReply rs = { REP_SEARCH }; rwm_op_state ros = { 0 }; + struct berval mndn = BER_BVNULL; if ( ((BackendInfo *)on->on_info->oi_orig)->bi_entry_get_rw == NULL ) { return SLAP_CB_CONTINUE; @@ -862,6 +863,8 @@ rwm_entry_get_rw( Operation *op, struct berval *ndn, return LDAP_OTHER; } + mndn = BER_BVISNULL( &ros.r_ndn ) ? *ndn : ros.r_ndn; + /* map attribute & objectClass */ if ( at != NULL ) { } @@ -874,7 +877,7 @@ rwm_entry_get_rw( Operation *op, struct berval *ndn, op2.o_bd = &db; op2.o_bd->bd_info = (BackendInfo *)on->on_info->oi_orig; op2.ors_attrs = slap_anlist_all_attributes; - rc = op2.o_bd->bd_info->bi_entry_get_rw( &op2, &ros.r_ndn, oc, at, rw, ep ); + rc = op2.o_bd->bd_info->bi_entry_get_rw( &op2, &mndn, oc, at, rw, ep ); if ( rc == LDAP_SUCCESS && *ep != NULL ) { rs.sr_entry = *ep; @@ -887,7 +890,7 @@ rwm_entry_get_rw( Operation *op, struct berval *ndn, } } - if ( ros.r_ndn.bv_val != ndn->bv_val ) { + if ( !BER_BVISNULL( &ros.r_ndn) && ros.r_ndn.bv_val != ndn->bv_val ) { op->o_tmpfree( ros.r_ndn.bv_val, op->o_tmpmemctx ); }