Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldapsearch against ldaptor always returns all attributes #38

Closed
the2nd opened this issue May 5, 2015 · 2 comments
Closed

ldapsearch against ldaptor always returns all attributes #38

the2nd opened this issue May 5, 2015 · 2 comments

Comments

@the2nd
Copy link

the2nd commented May 5, 2015

Hi,
if i do an ldapsearch agains ldaptor which requests just one (or some) attributes ldaptor seems to always return the complete ldif of the found object. Using the same seach against openldap only the "dn" and the requested attributes are returned.

You should be able to reproduce with the following steps:

Try ldapsearch which requests only specific attribute(s) with ldaptor:

  1. run ldaptest.py
  2. on second console run ldapsearch command that requests only "uid" attribute: ldapsearch -H ldap://localhost:8080 -b "dc=de" -w afdg -x uid
  3. the ldif returned from ldapsearch contains all object attributes!

Try ldapsearch which requests only specific attribute(s) with openldap:

  1. copy slapd.conf to /etc/openldap (or whatever directory your distribution uses)
  2. import ldap tree from ldaptor: ldapsearch -H ldap://localhost:8080 -b "dc=de" -w afdg -x | slapadd -l /dev/stdin
  3. start slapd (e.g. /etc/init.d/slapd start)
  4. run ldapsearch command that requests only "uid" attribute: ldapsearch -H ldap://localhost -b "dc=de" -D 'cn=manager,dc=example,dc=de' -w root -x uid
  5. the ldif returned from ldapsearch contains only "dn" and "uid" attributes

ldaptor.py: https://bpaste.net/show/3f5174d8ec15
slapd.conf: https://bpaste.net/show/c334ec415850

reference: http://twistedmatrix.com/pipermail/twisted-python/2015-May/029447.html

@psi29a
Copy link
Contributor

psi29a commented May 12, 2015

@the2nd Does #40 fix your problem? :)

Great job @cwaldbieser

@the2nd
Copy link
Author

the2nd commented May 17, 2015

Yes #40 fixes the issue. Thanks a lot! :)

@psi29a psi29a added this to the 15.0 - "Getting usable" milestone May 17, 2015
@psi29a psi29a added the bug label May 17, 2015
@psi29a psi29a closed this as completed May 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants