When ID view is detected, it needs to be preserved until the end of search
processing. We iterate over groups and need to know about ID views when
collecting the matched entries.
When ID view is detected, we restart map search from the top level
(cn=compat,$SUFFIX).
For the case of top level (cn=compat,$SUFFIX) match, a subtree which
activated ID view usage was not actually going into individual groups to
match overridden filter against the entries in those groups. This was
due to premature comparison with the group DN as
backend_should_descend() would have always matched it and caused to
short-circuit processing with empty entries.
Finally, since all memory allocations during the search must be present
until the search is processed, do not short-circuit 'return 0' from
within. Use a general cleanup code instead.
When ID view is detected, it needs to be preserved until the end of search
processing. We iterate over groups and need to know about ID views when
collecting the matched entries.
When ID view is detected, we restart map search from the top level
(cn=compat,$SUFFIX).
For the case of top level (cn=compat,$SUFFIX) match, a subtree which
activated ID view usage was not actually going into individual groups to
match overridden filter against the entries in those groups. This was
due to premature comparison with the group DN as
backend_should_descend() would have always matched it and caused to
short-circuit processing with empty entries.
Finally, since all memory allocations during the search must be present
until the search is processed, do not short-circuit 'return 0' from
within. Use a general cleanup code instead.
Resolves: rhbz#1984010
Signed-off-by: Alexander Bokovoy abokovoy@redhat.com