From 8c4c2ce789fed4672c018964175dd9eeb1f72394 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 12 Nov 2001 17:27:01 +0000 Subject: [PATCH] Fixes second part of ITS#1430 --- servers/slapd/back-ldbm/delete.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-ldbm/delete.c b/servers/slapd/back-ldbm/delete.c index 1dd4696ed3..3c64c1f932 100644 --- a/servers/slapd/back-ldbm/delete.c +++ b/servers/slapd/back-ldbm/delete.c @@ -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", -- 2.39.5