Apache DS ignores attrsonly

Thorsten Kampe thorsten at thorstenkampe.de
Mon Jul 13 12:22:45 CEST 2009


* Michael Ströder (Mon, 13 Jul 2009 11:51:29 +0200)
> Which versions of Python and python-ldap are you using?

Python 2.6.2, python-ldap 2.3.8, Apache DS 1.5.4
 
> I've tested it with my local OpenLDAP server with Python 2.6 and
> python-ldap 2.3.8 built against OpenLDAP RE24 libs:
> 
> >>> l.search_ext_s('dc=stroeder,dc=de',0,'(objectclass=*)',attrsonly=0)
> [('dc=stroeder,dc=de', {'description': ['Wurzeleintrag f\xc3\xbcr
> lokales Adressbuch von Michael Str\xc3\xb6der'], 'labeledURI':
> ['http://www.stroeder.de', 'http://www.block-floete.de'], 'objectClass':
> ['domain', 'labeledURIObject', 'domainRelatedObject'],
> 'associatedDomain': ['stroeder.com'], 'dc': ['stroeder'], 'o':
> ['Michaels'], 'seeAlso': ['dc=stroeder,dc=com']})]
> >>> l.search_ext_s('dc=stroeder,dc=de',0,'(objectclass=*)',attrsonly=1)
> [('dc=stroeder,dc=de', {'description': [], 'labeledURI': [],
> 'objectClass': [], 'associatedDomain': [], 'dc': [], 'o': [], 'seeAlso':
> []})]
> >>> l.search_ext_s('dc=stroeder,dc=de',0,'(objectclass=*)',attrsonly=True)
> [('dc=stroeder,dc=de', {'description': [], 'labeledURI': [],
> 'objectClass': [], 'associatedDomain': [], 'dc': [], 'o': [], 'seeAlso':
> []})]
> 
> So it seems that it simply works.

It does work against eDirectory and Active Directory (as mentioned). 
"ldapsearch -A" also works against Apache DS. The question is still: is 
that a Python-LDAP or Apache DS bug?

Could you install Apache Directory Server or Apache Directory Studio? 
Both allow you to create that directory that I queried in about one 
minute.

Thorsten





More information about the python-ldap mailing list