[melbourne-pug] python ldap issue

Brian May brian at microcomaustralia.com.au
Tue Jul 23 04:35:18 CEST 2013


Hello,

I have some simple python code for accessing LDAP. It retrieves some data,
calls modify with no changes, and repeats. If it receives SERVER_DOWN it
tries to reconnect and rebind to the server.

It works fine when you first run it.

Trouble is the reconnection and rebind seems to work fine, but now the LDAP
server isn't happy. It doesn't return privileged information such as
userPassword, and complains with the following error in the modify call:

Error {'info': 'modifications require authentication', 'desc': 'Strong(er)
authentication required'}

This is on a plain non-encrypted connection.

tshark shows that the bind request is not being sent across the wire, even
though I am calling simple_bind_s  *on* *a* *new* *connection*. So I tried
putting in a call to unbind, but this is not sent across the wire either.

A bug in the python LDAP bindings?

Test code is available here:

https://gist.github.com/brianmay/6059401

To test, run code, stop LDAP server, errors should appear. Then restart
LDAP server and errors should disappear.

Thanks
-- 
Brian May <brian at microcomaustralia.com.au>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/melbourne-pug/attachments/20130723/984dd5b4/attachment.html>


More information about the melbourne-pug mailing list