From: Howard Chu Date: Fri, 30 Nov 2001 01:21:52 +0000 (+0000) Subject: In presence_candidates(), always return a full match for objectClass. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~812 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d68b891ced4703a1660b75eb7f6dbd8649167621;p=openldap In presence_candidates(), always return a full match for objectClass. --- diff --git a/servers/slapd/back-bdb/filterindex.c b/servers/slapd/back-bdb/filterindex.c index b6c4141728..f1fe17c85f 100644 --- a/servers/slapd/back-bdb/filterindex.c +++ b/servers/slapd/back-bdb/filterindex.c @@ -191,6 +191,7 @@ presence_candidates( AttributeDescription *desc, ID *ids ) { + struct bdb_info *bdb = (struct bdb_info *) be->be_private; DB *db; int rc; slap_mask_t mask; @@ -198,6 +199,11 @@ presence_candidates( Debug( LDAP_DEBUG_TRACE, "=> bdb_presence_candidates\n", 0, 0, 0 ); + if( desc == slap_schema.si_ad_objectClass ) { + BDB_IDL_ALL( bdb, ids ); + return 0; + } + rc = bdb_index_param( be, desc, LDAP_FILTER_PRESENT, &db, &mask, &prefix ); diff --git a/servers/slapd/back-ldbm/filterindex.c b/servers/slapd/back-ldbm/filterindex.c index 55f873ba01..048050ca34 100644 --- a/servers/slapd/back-ldbm/filterindex.c +++ b/servers/slapd/back-ldbm/filterindex.c @@ -223,6 +223,10 @@ presence_candidates( idl = idl_allids( be ); + if( desc == slap_schema.si_ad_objectClass ) { + return idl; + } + rc = index_param( be, desc, LDAP_FILTER_PRESENT, &dbname, &mask, &prefix );