]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-meta/modrdn.c
Drop unnecessary memset()s
[openldap] / servers / slapd / back-meta / modrdn.c
index 1ec273a9bb8dac32abca6699c65761df1643b6c8..f6e27c64902f3d622e1c7363e982eb50825dd366 100644 (file)
@@ -118,6 +118,7 @@ meta_back_modrdn( Operation *op, SlapReply *rs )
                goto cleanup;
        }
 
+retry:;
        ctrls = op->o_ctrls;
        if ( ldap_back_proxy_authz_ctrl( &mc->mc_conns[ candidate ].msc_bound_ndn,
                mt->mt_version, &mt->mt_idassert, op, rs, &ctrls ) != LDAP_SUCCESS )
@@ -126,16 +127,17 @@ meta_back_modrdn( Operation *op, SlapReply *rs )
                goto cleanup;
        }
 
-retry:;
        rs->sr_err = ldap_rename( mc->mc_conns[ candidate ].msc_ld,
                        mdn.bv_val, op->orr_newrdn.bv_val,
                        mnewSuperior.bv_val, op->orr_deleteoldrdn,
                        ctrls, NULL, &msgid );
        rs->sr_err = meta_back_op_result( mc, op, rs, candidate, msgid,
-               mt->mt_timeout[ LDAP_BACK_OP_MODRDN ], LDAP_BACK_SENDRESULT );
+               mt->mt_timeout[ SLAP_OP_MODRDN ], LDAP_BACK_SENDRESULT );
        if ( rs->sr_err == LDAP_UNAVAILABLE && do_retry ) {
                do_retry = 0;
                if ( meta_back_retry( op, rs, &mc, candidate, 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;
                }
        }