Hi,
I am doing following steps in order to authenticate the user in my C program
using OpenLdap API:
Program 1:
1. ldap init
2. ldap set option to version3
3. search the user using ldap_search_st to get the user DN
4. ldap simple bind with user-DN and password
Now I want to use referral chasing feature.
For above program ldap search at step 3 returns NULL if user is not
available
Therefore, I added rebindproc function to search the user-DN on other server
The program is changed to:
Program 2:
1. ldap init server1
2. ldap set option to version3
3. ldap set option to rebindproc function
4. search the user using ldap_search_st to get the user DN
5. ldap simple bind with user-DN and password
In rebindproc, I am binding with root credentials and parsing referral URL
to get the base DN.
Here, I got the user-DN from refered server (server 2) in step 4.
However, ldap simple bind at step 5 fails saying invalid credentials.
It is correct, since the user is not present on server1.
Is there anything more I need to do, so that ldap_simple bind will happen
with referral server (server2).
What API shall I use to bind the user-DN to referral server?
Thanks,
Digambar