RFC4511 (section 4.5.3.1) shows that if a directory is split over several servers, then the client needs to wade through several redirections in order to get a definitive answer. It seems silly that every client would need to do this. Is there any (free) library that does all of this logic and just returns a GOOD/BAD/UNKNOWN result?
Asked
Active
Viewed 103 times
0
-
if you are talking about following referrals, Im pretty sure that OpenLDAP client library has an option to enable that behavior. – MK. May 30 '12 at 01:38
-
I didn't see that in the documentation. Do you have a pointer? – No One in Particular May 30 '12 at 01:57
1 Answers
0
http://linux.die.net/man/3/ldap_set_option
LDAP_OPT_REFERRAL_URLS Sets/gets an array containing the referral URIs associated to the LDAP handle. outvalue must be a char *, and the caller is responsible of freeing the returned string by calling ldap_memvfree(3), while invalue must be a NULL-terminated char *const *; the library duplicates the corresponding string. This option is OpenLDAP specific. LDAP_OPT_REFERRALS Determines whether the library should implicitly chase referrals or not. invalue must be const int *; its value should either be LDAP_OPT_OFF or LDAP_OPT_ON. outvalue must be int *.

MK.
- 33,605
- 18
- 74
- 111
-
I read this option as saying that it would gather the referral URIs and put them in a list. I didn't read it as saying that they library would redirect its query without any client interaction. Was I wrong? – No One in Particular May 30 '12 at 03:38
-
I read it as the library will follow them for you. And I've seen code which assumes that it's the case. I didn't test that scenario though. – MK. May 30 '12 at 04:17