]> git.sur5r.net Git - openldap/commitdiff
quick fix for null DN
authorPierangelo Masarati <ando@openldap.org>
Sun, 2 Jan 2011 02:15:21 +0000 (02:15 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 2 Jan 2011 02:15:21 +0000 (02:15 +0000)
servers/slapd/modrdn.c

index e2e4bf00ce029503ab109d0fb8e7df7164c469b4..562da721c8091cc5f2161d18cdc82f9b9ed3432e 100644 (file)
@@ -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 ) ) {