- /* Get attribute type and attribute value of our new rdn, we will
- * need to add that to our new entry
- */
- if ( !new_rdn && ldap_bv2rdn_x( &op->oq_modrdn.rs_newrdn, &new_rdn,
- (char **)&rs->sr_text, LDAP_DN_FORMAT_LDAP, op->o_tmpmemctx ) )
- {
- Debug( LDAP_DEBUG_TRACE,
- LDAP_XSTRING(bdb_modrdn) ": can't figure out "
- "type(s)/values(s) of newrdn\n",
- 0, 0, 0 );
- rs->sr_err = LDAP_INVALID_DN_SYNTAX;
- rs->sr_text = "unknown type(s) used in RDN";
- goto return_results;
- }
-
- Debug( LDAP_DEBUG_TRACE,
- LDAP_XSTRING(bdb_modrdn)
- ": new_rdn_type=\"%s\", new_rdn_val=\"%s\"\n",
- new_rdn[ 0 ]->la_attr.bv_val,
- new_rdn[ 0 ]->la_value.bv_val, 0 );
-
- if ( op->oq_modrdn.rs_deleteoldrdn ) {
- if ( !old_rdn && ldap_bv2rdn_x( &op->o_req_dn, &old_rdn,
- (char **)&rs->sr_text, LDAP_DN_FORMAT_LDAP, op->o_tmpmemctx ) )
- {
- Debug( LDAP_DEBUG_TRACE,
- LDAP_XSTRING(bdb_modrdn) ": can't figure out "
- "the old_rdn type(s)/value(s)\n",
- 0, 0, 0 );
- rs->sr_err = LDAP_OTHER;
- rs->sr_text = "cannot parse RDN from old DN";
- goto return_results;
- }
- }
-
- /* prepare modlist of modifications from old/new rdn */
- if (!mod) {
- rs->sr_err = slap_modrdn2mods( op, rs, e, old_rdn, new_rdn, &mod );
- if ( rs->sr_err != LDAP_SUCCESS ) {
- goto return_results;
- }
- }