ldap/servers/slapd/index_subsystem.c | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit c2658c14802783d0a8919783aa7123be9e749c18
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Thu Nov 7 16:14:57 2013 +0100
Ticket 47521 - Complex filter in a search request doen't work as expected.
Bug Description: Before the search is executed there is the attempt to simplify
filters.
eg a filter like (&(&(a=x))(&(b=y))) it is reduced to (&(a=x)(b=y)).
but if there is a simple filter between complex filters it is lost
eg (&(&(a=x))(c=z)(&(b=y))) is also transformed to (&(a=x)(b=y)).
Fix Description: if a simple filter is processed and there was a previous complex
filter
flattend, insert the simple filter properly
https://fedorahosted.org/389/ticket/47521
Reviewed by: richM, thanks
diff --git a/ldap/servers/slapd/index_subsystem.c b/ldap/servers/slapd/index_subsystem.c
index a013486..eff908e 100644
--- a/ldap/servers/slapd/index_subsystem.c
+++ b/ldap/servers/slapd/index_subsystem.c
@@ -447,6 +447,11 @@ static void index_subsys_flatten_filter(Slapi_Filter *flist)
}
else
{
+ /* don't loose a simple filter */
+ if (flast) {
+ flast->f_next = f;
+ flast = f;
+ }
fprev = f;
f = f->f_next;
}