===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/modrdn.c,v
retrieving revision 1.170.2.8
retrieving revision 1.170.2.9
Index: openldap-2.4.23/servers/slapd/modrdn.c
===================================================================
--- openldap-2.4.23.orig/servers/slapd/modrdn.c
+++ openldap-2.4.23/servers/slapd/modrdn.c
@@ -1,4 +1,4 @@
-/* $OpenLDAP: pkg/ldap/servers/slapd/modrdn.c,v 1.170.2.8 2010/06/10 17:48:07 quanah Exp $ */
+/* $OpenLDAP: servers/slapd/modrdn.c,v 1.170.2.9 2011/01/04 19:44:44 quanah Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
  * Copyright 1998-2010 The OpenLDAP Foundation.
@@ -392,7 +392,9 @@ slap_modrdn2mods(
 	LDAPRDN		new_rdn = NULL;
 
 	assert( !BER_BVISEMPTY( &op->oq_modrdn.rs_newrdn ) );
-	assert( !op->orr_deleteoldrdn || !BER_BVISEMPTY( &op->o_req_dn ) );
+
+	/* if requestDN is empty, silently reset deleteOldRDN */
+	if ( BER_BVISEMPTY( &op->o_req_dn ) ) op->orr_deleteoldrdn = 0;
 
 	if ( ldap_bv2rdn_x( &op->oq_modrdn.rs_newrdn, &new_rdn,
 		(char **)&rs->sr_text, LDAP_DN_FORMAT_LDAP, op->o_tmpmemctx ) ) {
