Re: Can slapd chase referrals?

Mark Smith (mcs@netscape.com)
Tue, 24 Sep 1996 11:16:59 -0700

Dave Carlson wrote:
>
> I'd like to configure slapd to automatically chase referrals, rather
> than return a "referral" message containing a URL for another ldap
> server. I understand that the common practice is for the client to
> chase these referrals instead of the server. However, I'm developing an
> LDAP client in Java that would run as an applet, and Java is
> specifically prohibited from establishing a connection to any server
> other than the one from which it originated. Thus, the slapd server (or
> maybe a referral daemon) must do all the chasing.

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