Hello.

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=example ,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:

get DN for [EMAIL PROTECTED] using search filter (mail='[EMAIL PROTECTED]')

if (found DN [ref 1] has someBooleanAttribute set) {
return value
} else {
if (found DN's parent [ref 2] has someBooleanAttribute set) {
return value
} else {
if (found DN's parent's parent [ref 3] has someBooleanAttribute set)
return value
}
}


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?

I would appreciate a pointer to related documentation, or a sample query. For what it's worth, I have read the Net::LDAP docs on CPAN and the OpenLDAP user's guide, but don't see a better way than sending three separate queries.

Thank you.
 - Jason Parsons



Reply via email to