summaryrefslogtreecommitdiffstats
path: root/ldap/servers
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
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')
-rw-r--r--ldap/servers/slapd/back-ldbm/ldbm_search.c2
-rw-r--r--ldap/servers/slapd/back-ldbm/vlv.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c
index 7d91d47a..8d57ae49 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
@@ -637,7 +637,7 @@ ldbm_back_search( Slapi_PBlock *pb )
* this is not an internal operation.
* We hope the plugins know what they are doing!
*/
- if (!operation_is_flag_set(operation, OP_FLAG_INTERNAL)) {
+ if (!operation_is_flag_set(operation, OP_FLAG_INTERNAL)) {
PR_Lock(inst->inst_config_mutex);
ri = inst->require_index;
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: