From: Howard Chu Date: Tue, 7 Oct 2008 22:52:59 +0000 (+0000) Subject: Fix dn2idl when suffix = "" X-Git-Tag: ACLCHECK_0~1280 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=16710f4ed4796f6f15888cac13222009c0702b17;p=openldap Fix dn2idl when suffix = "" --- diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index a358fe0d66..fd557ea294 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -393,7 +393,8 @@ bdb_dn2idl( #ifndef BDB_MULTIPLE_SUFFIXES if ( prefix == DN_SUBTREE_PREFIX - && ( ei->bei_id == 0 || ei->bei_parent->bei_id == 0 )) { + && ( ei->bei_id == 0 || + ( ei->bei_parent->bei_id == 0 && op->o_bd->be_suffix[0].bv_len ))) { BDB_IDL_ALL(bdb, ids); return 0; } @@ -1184,7 +1185,7 @@ hdb_dn2idl( #ifndef BDB_MULTIPLE_SUFFIXES if ( op->ors_scope != LDAP_SCOPE_ONELEVEL && ( ei->bei_id == 0 || - ei->bei_parent->bei_id == 0 )) + ( ei->bei_parent->bei_id == 0 && op->o_bd->be_suffix[0].bv_len ))) { BDB_IDL_ALL( bdb, ids ); return 0;