- ldap_rename2_s( lc->ld, dn, newrdn, newSuperior, deleteoldrdn );
- return( ldap_back_op_result( lc, op ) );
+ rs->sr_err = ldap_rename( lc->lc_ld, op->o_req_dn.bv_val,
+ op->orr_newrdn.bv_val, newSup,
+ op->orr_deleteoldrdn, ctrls, NULL, &msgid );
+ rc = ldap_back_op_result( lc, op, rs, msgid,
+ li->li_timeout[ SLAP_OP_MODRDN ],
+ ( LDAP_BACK_SENDRESULT | retrying ) );
+ if ( rs->sr_err == LDAP_UNAVAILABLE && retrying ) {
+ retrying &= ~LDAP_BACK_RETRYING;
+ if ( ldap_back_retry( &lc, op, rs, LDAP_BACK_SENDERR ) ) {
+ /* if the identity changed, there might be need to re-authz */
+ (void)ldap_back_proxy_authz_ctrl_free( op, &ctrls );
+ goto retry;
+ }
+ }
+
+cleanup:
+ (void)ldap_back_proxy_authz_ctrl_free( op, &ctrls );
+
+ if ( lc != NULL ) {
+ ldap_back_release_conn( li, lc );
+ }
+
+ return rc;