summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/back-ldbm/vlv.c
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@kiki.usersys.redhat.com>2009-06-23 16:46:29 -0700
committerNoriko Hosoi <nhosoi@kiki.usersys.redhat.com>2009-06-23 16:46:29 -0700
commit6d6630452f742f46519ec16aac4d6943e62ae286 (patch)
treecb91057a9d977fc52e58159592d0cfba75615e49 /ldap/servers/slapd/back-ldbm/vlv.c
parent5c3eb36aaa05e9cd4eaa923e337d3b55cf584a39 (diff)
downloadds-6d6630452f742f46519ec16aac4d6943e62ae286.tar.gz
ds-6d6630452f742f46519ec16aac4d6943e62ae286.tar.xz
ds-6d6630452f742f46519ec16aac4d6943e62ae286.zip
507460 Access log could mistakenly report notes=U for VLV searches
Summary: Access log reports 'notes=U' for VLV indexed searches if there are no records to be found Fix Description: VLV creates an empty IDL if no matched entries are found. To do so, VLV code was calling idl_alloc with argument 0, which generated ALLID. It's changed to call idl_alloc with 1. It creates a normal empty IDL.
Diffstat (limited to 'ldap/servers/slapd/back-ldbm/vlv.c')
-rw-r--r--ldap/servers/slapd/back-ldbm/vlv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ldap/servers/slapd/back-ldbm/vlv.c b/ldap/servers/slapd/back-ldbm/vlv.c
index f1e06167..f0ce9e6a 100644
--- a/ldap/servers/slapd/back-ldbm/vlv.c
+++ b/ldap/servers/slapd/back-ldbm/vlv.c
@@ -1185,7 +1185,8 @@ vlv_build_candidate_list( backend *be, struct vlvIndex* p, const struct vlv_requ
vlv_request_control);
if (si==length) {
do_trim = 0;
- *candidates = idl_alloc(0);
+ /* minimum idl_alloc size should be 1; 0 is considered ALLID */
+ *candidates = idl_alloc(1);
}
break;
default:
@@ -1356,7 +1357,8 @@ vlv_trim_candidates(backend *be, const IDList *candidates, const sort_spec* sort
if(si==candidates->b_nids)
{
do_trim= 0;
- resultIdl= idl_alloc(0);
+ /* minimum idl_alloc size should be 1; 0 is considered ALLID */
+ resultIdl= idl_alloc(1);
}
break;
default: