]> git.sur5r.net Git - openldap/commitdiff
ITS#6070
authorQuanah Gibson-Mount <quanah@openldap.org>
Fri, 1 May 2009 21:19:29 +0000 (21:19 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Fri, 1 May 2009 21:19:29 +0000 (21:19 +0000)
CHANGES
servers/slapd/overlays/rwm.c

diff --git a/CHANGES b/CHANGES
index 1799e099851681b235fd6fcc228c755d3ba5b9ae..d56548ef31e35c03db72db02e8d6043ba81cf79f 100644 (file)
--- 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)
index de8da75f3ef32141ed766647434662e5217d75d7..93b1ae33b053ad019f74c7008c3e056c7c9a6345 100644 (file)
@@ -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 );
        }