Hmmm... an interesting problem.
> I've skimmed through the source for ldap v3.3, and it appears that the
> slapd server simply checks if one of its backends includes the requested
> DN, otherwise returns a referral message to the client. But, a
> command-line query from the ldapsearch tool *does* chase referrals.
> That logic appears to be part of the client ldap library, not integrated
> into the slapd server. Is this correct?
Yes. Slapd itself knows how to return referrals, but never chases
them. The LDAP library (libldap) does include code that can be used to
automatically chase referrals.
> So, the $100 dollar question, how difficult would it be to develop a
> variation on the slapd server that included to logic to automatically
> chase referrals? Would it be a fairly straight forward matter of
> calling and linking in the existing code (maybe the ldap_search()
> function?) used in the ldapsearch command? Better yet, has anyone done
> this already?
I don't know of anyone who has done this, but it should be possible. I
haven't thought about it enough to know how easy it would be, but as you
note, a lot of the necessary code has already been written.
-- Mark Smith Netscape Communications Corp. The opinions I express are my own. Directory Server Engineering