I have and LDAP tree set up like so (including only the relevant parts):
dn: ou=example,ou=accounts,dc=example,dc=com [ref 3] someBooleanAttribute: FALSE
dn: ou=example.com,ou=example,ou=accounts,dc=example,dc=com [ref 2] someBooleanAttribute: TRUE
dn: [EMAIL PROTECTED],ou=example.com,ou=example,ou=accounts,dc=exampl e,dc=com [ref 1]
mail: [EMAIL PROTECTED]
someBooleanAttribute: FALSE
I have an email address ('[EMAIL PROTECTED]'). I need to know the value of someBooleanAttribute for the "most specific" match. That is, in pseudocode:
Does Net::LDAP make available some way to handle this "inheritance" in a single query? Or do I have to send off all three queries and stitch together the results?
LDAP does not have support for this kind of search. You will need todo a search to obtain [ref 1] then if it does not have the required attribute do a "one" search on the parent dn with a filter like (someBooleanAttribute=*). If that returns no results, search for the next parent and so-on.
Graham.