]> git.sur5r.net Git - openldap/commitdiff
Fixes second part of ITS#1430
authorPierangelo Masarati <ando@openldap.org>
Mon, 12 Nov 2001 17:27:01 +0000 (17:27 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 12 Nov 2001 17:27:01 +0000 (17:27 +0000)
servers/slapd/back-ldbm/delete.c

index 1dd4696ed34f9245756dc0ef143e8fac622774eb..3c64c1f9323a1817a57d19f9bd06d3486314ed95 100644 (file)
@@ -117,7 +117,7 @@ ldbm_back_delete(
        }
 
        /* delete from parent's id2children entry */
-       if( (pdn = dn_parent( be, e->e_ndn )) != NULL ) {
+       if( (pdn = dn_parent( be, e->e_ndn )) != NULL && pdn[ 0 ] != '\0' ) {
                if( (p = dn2entry_w( be, pdn, NULL )) == NULL) {
 #ifdef NEW_LOGGING
                        LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
@@ -153,7 +153,7 @@ ldbm_back_delete(
 
        } else {
                /* no parent, must be root to delete */
-               if( ! be_isroot( be, op->o_ndn ) ) {
+               if( ! be_isroot( be, op->o_ndn ) && ! be_issuffix( be, "" )  ) {
 #ifdef NEW_LOGGING
                        LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
                                   "ldbm_back_delete: (%s) has no parent & not a root.\n",