[Date Prev][Date Next]
Infinite chasing of cycled V3 referrals/references (ITS#2894)
Full_Name: Alexander Dsugan
OS: Mandrake Linux
Submission from: (NULL) (126.96.36.199)
I've come across a problem with V3 referral/references chasing: a search request
goes into infinte loop while chasing references/referrals which make a loop.
Assume we have a LDAP tree like:
ou=subentry1,ou=entry1 (reference to ou=entry2)
ou=subentry2,ou=entry2 (reference to ou=entry1)
If we set version=3, LDAP_OPT_REFERRALS=ON and make a search with base dn
'ou=entry1' and scope 'sub' using a synchronous function, e.g ldap_search_s()
our client will hang, the library won't stop chasing the references despite
defined hop limit.
If we set version=2 and perform the same search it will work as expected.
The following difference between V2 and V3 referral chasing was found:
ldap_chase_referral() function, which used for V2, passes current request record
as a parent into the ldap_send_server_request() function, in the meantime the
ldap_chase_v3referral() function, used for V3, passes original request into
So, when V3 is used, any child request, which chases a subreference, becomes a
child of the top(original) request. In that case the 'lr_parentcnt' field of the
request always equals to 1 and the value will never exceed the defined hop
There is something wrong..
I hoped that replacement of 'origreq' parameter by 'lr' in the
ldap_send_server_request() function would help, but this change made the library
unable to chase a sequence of references,e.g.
'entry1-ref--->entry2-ref--->entry3', so I was wrong :(