[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4922) test_filter problem on uid filter



Please post replies to the ITS system.

Juri Tanganelli wrote:
> The entry e497004 is a candidate for sure

My point is: it's clear that if you filter for (uid=e497004) the
corresponding entry must be selected as candidate.  But does it actually
get selected, and does test_filter() get applied to it?  I understand
it's obvious, but the typical bug with things that have always worked is
that one believes they don't work while the point is that they don't get
used as one expects.  You should check this.

> : a filter on a different
> attribute
> of the same entry returns the correct result. I can provide you with any
> information you need for an analysis of the problem (stack trace, variable
> dumps, etc...).

> What kind of information do you want me to produce?

Well, you should check that when searching for (uid=e497004)
test_filter() gets invoked and the entry passed to it contains the
attribute "uid" with the value "e497004".  To do this, you should run
slapd within a debugger, set a breakpoint at test_filter() and, as soon
as the function is entered, check the contents of e->e_attrs down the
list until you find the "uid" attribute.

If the attribute is there with the requested value, and it is searchable
(ACL), test_filter() must succeed (return LDAP_COMPARE_TRUE).

So you need to check:
- the presence of "uid"
- the presence of the desired value
- the access privileges of the identity that runs the request

It might be that test_filter() returns LDAP_COMPARE_TRUE but the result
is handled incorrectly by your custom backend, or by the frontend based
on the way the result is passed back to it.  By stepping through the
whole operation you should be able to detect what goes wrong.

If you find out that the error is in test_filter(), we'll be happy of
fixing it, of course.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------