mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-30 11:39:34 -05:00
ITS#7930 partial fix
Only restore op->o_req_dn if no one else changed it on us.
This commit is contained in:
parent
92c7a89130
commit
18d9470984
1 changed files with 10 additions and 8 deletions
|
|
@ -626,6 +626,11 @@ cleanup:;
|
|||
}
|
||||
|
||||
further_cleanup:;
|
||||
if ( op->o_req_dn.bv_val == pdn.bv_val ) {
|
||||
op->o_req_dn = odn;
|
||||
op->o_req_ndn = ondn;
|
||||
}
|
||||
|
||||
if ( free_dn ) {
|
||||
op->o_tmpfree( pdn.bv_val, op->o_tmpmemctx );
|
||||
op->o_tmpfree( ndn.bv_val, op->o_tmpmemctx );
|
||||
|
|
@ -651,9 +656,6 @@ further_cleanup:;
|
|||
rc = rs2.sr_err;
|
||||
}
|
||||
|
||||
op->o_req_dn = odn;
|
||||
op->o_req_ndn = ondn;
|
||||
|
||||
#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
|
||||
(void)chaining_control_remove( op, &ctrls );
|
||||
#endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
|
||||
|
|
@ -897,14 +899,16 @@ cleanup:;
|
|||
}
|
||||
|
||||
further_cleanup:;
|
||||
if ( op->o_req_dn.bv_val == pdn.bv_val ) {
|
||||
op->o_req_dn = odn;
|
||||
op->o_req_ndn = ondn;
|
||||
}
|
||||
|
||||
if ( free_dn ) {
|
||||
op->o_tmpfree( pdn.bv_val, op->o_tmpmemctx );
|
||||
op->o_tmpfree( ndn.bv_val, op->o_tmpmemctx );
|
||||
}
|
||||
|
||||
op->o_req_dn = odn;
|
||||
op->o_req_ndn = ondn;
|
||||
|
||||
if ( tmp_oq_search.rs_filter != NULL ) {
|
||||
filter_free_x( op, tmp_oq_search.rs_filter, 1 );
|
||||
}
|
||||
|
|
@ -927,8 +931,6 @@ further_cleanup:;
|
|||
(void)chaining_control_remove( op, &ctrls );
|
||||
#endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
|
||||
|
||||
op->o_req_dn = odn;
|
||||
op->o_req_ndn = ondn;
|
||||
rs->sr_type = REP_SEARCHREF;
|
||||
rs->sr_entry = save_entry;
|
||||
rs->sr_flags = save_flags;
|
||||
|
|
|
|||
Loading…
Reference in a new issue