From 16710f4ed4796f6f15888cac13222009c0702b17 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 7 Oct 2008 22:52:59 +0000 Subject: [PATCH] Fix dn2idl when suffix = "" --- servers/slapd/back-bdb/dn2id.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.39.5