From: Kurt Zeilenga Date: Sat, 14 Aug 1999 01:19:29 +0000 (+0000) Subject: Fix add to topless root. X-Git-Tag: TWEB_OL_BASE~218 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aec2f1f17e061f5aad9449ab69e347be15cb64f7;p=openldap Fix add to topless root. --- diff --git a/servers/slapd/back-bdb2/add.c b/servers/slapd/back-bdb2/add.c index 5c72225f76..bb495be727 100644 --- a/servers/slapd/back-bdb2/add.c +++ b/servers/slapd/back-bdb2/add.c @@ -55,7 +55,7 @@ bdb2i_back_add_internal( pdn = dn_parent( be, e->e_ndn ); - if( pdn != NULL && *pdn != '\0' && !be_issuffix(be, "") ) { + if( pdn != NULL && *pdn != '\0' ) { Entry *matched = NULL; assert( *pdn != '\0' ); @@ -155,7 +155,7 @@ bdb2i_back_add_internal( } /* no parent, must be adding entry to root */ - if ( ! be_isroot( be, op->o_ndn ) ) { + if ( !be_isroot( be, op->o_ndn ) && !be_issuffix(be, "") ) { Debug( LDAP_DEBUG_TRACE, "%s add denied\n", pdn == NULL ? "suffix" : "entry at root", 0, 0 ); diff --git a/servers/slapd/back-ldbm/add.c b/servers/slapd/back-ldbm/add.c index b6679f1994..a3ff1feca5 100644 --- a/servers/slapd/back-ldbm/add.c +++ b/servers/slapd/back-ldbm/add.c @@ -62,7 +62,7 @@ ldbm_back_add( pdn = dn_parent( be, e->e_ndn ); - if( pdn != NULL && *pdn != '\0' && !be_issuffix(be, "") ) { + if( pdn != NULL && *pdn != '\0' ) { Entry *matched = NULL; assert( *pdn != '\0' ); @@ -167,7 +167,7 @@ ldbm_back_add( } /* no parent, must be adding entry to root */ - if ( ! be_isroot( be, op->o_ndn ) ) { + if ( !be_isroot( be, op->o_ndn ) && !be_issuffix( be, "" ) ) { ldap_pvt_thread_mutex_unlock(&li->li_add_mutex); Debug( LDAP_DEBUG_TRACE, "%s add denied\n",