From: <mi...@st...> - 2004-04-07 07:52:53
|
Jerome Alet wrote: > On Wed, Apr 07, 2004 at 12:38:27AM +0200, Michael Str=F6der wrote: >=20 >>Jerome Alet wrote: >> >>>I wanted to know if special coding is needed to support referrals ?=20 >> >>Yes. > > Ouch ! That's short ! Yes, since your mileage may vary. >>>Is there some code example somewhere on how to deal with them ? >> >>I don't have simple code snippet around. You could try to let the OpenLDAP libs handle the referral by setting: ldap.set_option(ldap.OPT_REFERRALS,1) Note that referral handling in OpenLDAP libs is considered to be broken. You could try to handle the referral by catching the exception ldap.REFER= RAL=20 which contains the LDAP URL of the referred LDAP entry/server: ldap.set_option(ldap.OPT_REFERRALS,0) You can dig into the source code of web2ldap to find out how I'm doing it= =2E=20 Try to provoke the same situation with web2ldap to see what happens.=20 web2ldap asks for a new login when following a referral. > Yes, this is the case. So tell me if I understand correctly : >=20 > - My app tries to do the modification to the server it is bound to, > which is the slave. > =20 > - This fails AND automatic referral handling is not activated because= =20 > I've not coded anything special to handle referrals. > =20 > - Then the exception is about authentication because stronger > credentials would be needed to write to the slave. > =20 > Am I correct ? Not sure since this depends on server configuration. You have to find out= =20 yourself what really happens in your environment. Ciao, Michael. |