Fixes second part of ITS#1430

This commit is contained in:
Pierangelo Masarati 2001-11-12 17:27:01 +00:00
parent afd0037eda
commit 8c4c2ce789

View 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",