[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#6712) dont-use-copy/syncrepl/chain hasSubordinates extra vals



Full_Name: David De La Harpe Golden (ICHEC)
Version: 2.4.23
OS: debian/unstable
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (193.1.200.66)


I was playing with the experimental "dont-use-copy" ldap control in conjunction
with a basic test provider-consumer syncrepl setup and chain overlay back to the
provider on the consumer.  I realise the control is experimental and the issue
is not major, but anyway, better to report these things:

Seems that when the control is used in a search request to the consumer,
hasSubordinates on the returned value is getting extra values. As
hasSubordinates is AFAICS defined as a single-value attribute, that's strange.

# e.g. Test using python-ldap
import ldap
from ldap.controls import LDAPControl
class _ExpDontUseCopyControl(LDAPControl):
    controlType = '1.3.6.1.4.1.4203.666.5.15'

provider = ldap.open('localhost', 3389)
consumer = ldap.open('localhost', 389)
provider.bind('cn=something,dc=example,dc=com', 'somepw')
consumer.bind('cn=something,dc=example,dc=com', 'somepw')

provider.search_ext_s('cn=foo,dc=example,dc=com', ldap.SCOPE_BASE,
'(objectClass=*)', ['hasSubordinates'], serverctrls=[])

=> [('cn=foo,dc=example,dc=com', {'hasSubordinates': ['FALSE']})]

provider.search_ext_s('cn=foo,dc=example,dc=com', ldap.SCOPE_BASE,
'(objectClass=*)', ['hasSubordinates'],
serverctrls=[_ExpDontUseCopyControl(True)])

=> [('cn=foo,dc=example,dc=com', {'hasSubordinates': ['FALSE']})]

consumer.search_ext_s('cn=foo,dc=example,dc=com', ldap.SCOPE_BASE,
'(objectClass=*)', ['hasSubordinates'], serverctrls=[])

=> [('cn=foo,dc=example,dc=com', {'hasSubordinates': ['FALSE']})]

consumer.search_ext_s('cn=foo,dc=example,dc=com', ldap.SCOPE_BASE,
'(objectClass=*)', ['hasSubordinates'],
serverctrls=[_ExpDontUseCopyControl(True)])

=> [('cn=foo,dc=example,dc=com', {'hasSubordinates': ['FALSE', 'FALSE']})]