Commit 66d43774 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#5729

parent 8fc04eb4
......@@ -30,6 +30,7 @@ OpenLDAP 2.4.12 Release (2008/10/08)
Fixed slapd-bdb entry return if attr not present (ITS#5650)
Fixed slapd-bdb olcDbMode syntax (ITS#5713)
Fixed slapd-bdb/hdb release search entries earlier (ITS#5728)
Fixed slapd-bdb/hdb subtree search with empty suffix (ITS#5729)
Fixed slapd-dnssrv memory handling (ITS#5691)
Fixed slapd-ldap,slapd-meta invalid filter behavior (ITS#5614)
Fixed slapd-meta memory handling (ITS#5691)
......
......@@ -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;
}
......@@ -613,10 +614,12 @@ hdb_dn2id_add(
tmp[1] = eip->bei_id;
*ptr = DN_ONE_PREFIX;
bdb_idl_cache_add_id( bdb, db, &key, e->e_id );
*ptr = DN_SUBTREE_PREFIX;
for (; eip && eip->bei_parent->bei_id; eip = eip->bei_parent) {
tmp[1] = eip->bei_id;
bdb_idl_cache_add_id( bdb, db, &key, e->e_id );
if ( eip->bei_parent ) {
*ptr = DN_SUBTREE_PREFIX;
for (; eip && eip->bei_parent->bei_id; eip = eip->bei_parent) {
tmp[1] = eip->bei_id;
bdb_idl_cache_add_id( bdb, db, &key, e->e_id );
}
}
}
......@@ -711,10 +714,12 @@ func_leave:
tmp[1] = eip->bei_id;
*ptr = DN_ONE_PREFIX;
bdb_idl_cache_del_id( bdb, db, &key, e->e_id );
*ptr = DN_SUBTREE_PREFIX;
for (; eip && eip->bei_parent->bei_id; eip = eip->bei_parent) {
tmp[1] = eip->bei_id;
bdb_idl_cache_del_id( bdb, db, &key, e->e_id );
if ( eip ->bei_parent ) {
*ptr = DN_SUBTREE_PREFIX;
for (; eip && eip->bei_parent->bei_id; eip = eip->bei_parent) {
tmp[1] = eip->bei_id;
bdb_idl_cache_del_id( bdb, db, &key, e->e_id );
}
}
}
Debug( LDAP_DEBUG_TRACE, "<= hdb_dn2id_delete 0x%lx: %d\n", e->e_id, rc, 0 );
......@@ -1181,7 +1186,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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment