- /* deref suffix alias if appropriate */
- suffix_alias( be, &ndn );
-
-#if defined( LDAP_SLAPI )
- slapi_x_backend_set_pb( pb, be );
- slapi_x_connection_set_pb( pb, conn );
- slapi_x_operation_set_pb( pb, op );
- slapi_pblock_set( pb, SLAPI_DELETE_TARGET, (void *)dn.bv_val );
- slapi_pblock_set( pb, SLAPI_MANAGEDSAIT, (void *)(1) );
-
- rc = doPluginFNs( be, SLAPI_PLUGIN_PRE_DELETE_FN, pb );
- if ( rc != 0 ) {
- /*
- * A preoperation plugin failure will abort the
- * entire operation.
- */
-#ifdef NEW_LOGGING
- LDAP_LOG( OPERATION, INFO, "do_delete: delete preoperation plugin "
- "failed\n", 0, 0, 0 );
-#else
- Debug (LDAP_DEBUG_TRACE, "do_delete: delete preoperation plugin failed.\n",
- 0, 0, 0);
-#endif
- if ( slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void *)&rc ) != 0 )
- rc = LDAP_OTHER;
+ /* check for referrals */
+ if( backend_check_referrals( op, rs ) != LDAP_SUCCESS ) {