- int repl_user = be_isupdate( op->o_bd, &op->o_ndn );
-#ifndef SLAPD_MULTIMASTER
- if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo ) &&
- ( !op->o_bd->be_update_ndn.bv_len || repl_user ))
-#else
- if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo ))
-#endif
- {
-
- if ( !repl_user ) {
- struct berval csn = { 0 , NULL };
- char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
- slap_get_csn( op, csnbuf, sizeof(csnbuf), &csn, 1 );
- }
-
- repstamp( op );
- if ( (op->o_bd->be_delete)( op, rs ) == 0 ) {
-#ifdef SLAPD_MULTIMASTER
- if ( !op->o_bd->be_update_ndn.bv_len || !repl_user )
-#endif
- {
- replog( op );
+ int repl_user = be_isupdate( op );
+ if ( !SLAP_SINGLE_SHADOW(op->o_bd) || repl_user ) {
+ struct berval org_req_dn = BER_BVNULL;
+ struct berval org_req_ndn = BER_BVNULL;
+ struct berval org_dn = BER_BVNULL;
+ struct berval org_ndn = BER_BVNULL;
+ int org_managedsait;
+
+ op->o_bd = op_be;
+ op->o_bd->be_delete( op, rs );
+
+ org_req_dn = op->o_req_dn;
+ org_req_ndn = op->o_req_ndn;
+ org_dn = op->o_dn;
+ org_ndn = op->o_ndn;
+ org_managedsait = get_manageDSAit( op );
+ op->o_dn = op->o_bd->be_rootdn;
+ op->o_ndn = op->o_bd->be_rootndn;
+ op->o_managedsait = SLAP_CONTROL_NONCRITICAL;
+
+ while ( rs->sr_err == LDAP_SUCCESS &&
+ op->o_delete_glue_parent )
+ {
+ op->o_delete_glue_parent = 0;
+ if ( !be_issuffix( op->o_bd, &op->o_req_ndn )) {
+ slap_callback cb = { NULL, NULL, NULL, NULL };
+ cb.sc_response = slap_null_cb;
+ dnParent( &op->o_req_ndn, &pdn );
+ op->o_req_dn = pdn;
+ op->o_req_ndn = pdn;
+ op->o_callback = &cb;
+ op->o_bd->be_delete( op, rs );
+ } else {
+ break;