- be = select_backend(&pEntry->e_nname, 0, 0);
- if ( be == NULL ) {
- rc = LDAP_PARTIAL_RESULTS;
- goto cleanup;
- }
-
- if ( be ) {
- int repl_user = be_isupdate(be, &be->be_rootdn );
- if ( !be->be_update_ndn.bv_len || repl_user ) {
- int update = be->be_update_ndn.bv_len;
- char textbuf[SLAP_TEXT_BUFLEN];
- size_t textlen = sizeof textbuf;
-
- rc = slap_mods_check( modlist, update, &text,
- textbuf, textlen );
+ op->o_bd = select_backend( &pEntry->e_nname, 0, 0 );
+ if ( op->o_bd == NULL ) {
+ rc = LDAP_PARTIAL_RESULTS;
+ } else {
+ int repl_user = be_isupdate_dn( op->o_bd, &op->o_bd->be_rootdn );
+ if ( !op->o_bd->be_update_ndn.bv_len || repl_user ) {
+ int update = !BER_BVISNULL( &op->o_bd->be_update_ndn );
+ char textbuf[ SLAP_TEXT_BUFLEN ];
+ size_t textlen = sizeof( textbuf );
+
+ rc = slap_mods_check( modlist, &text,
+ textbuf, textlen, NULL );