Odd error with sasl_interactive_bind_s

David Hawes dhawes at vt.edu
Wed Mar 2 18:30:32 CET 2005

I am attempting to connect to a directory using SASL EXTERNAL with Python (my 
version, from Debian packages, is 2.1.3) and python-ldap-2.0.6.  With both my 
code and the python-ldap-2.0.6/Demo/sasl_bind.py example, I get the following 

Traceback (most recent call last):
  File "sasl_bind.py", line 69, in ?
    l.sasl_interactive_bind_s("", sasl_auth)
  File "/usr/lib/python2.1/site-packages/ldap/ldapobject.py", line 196, in
sasl_interactive_bind_s    return
 File "/usr/lib/python2.1/site-packages/ldap/ldapobject.py", line
94, in _ldap_call    
 result = func(*args,**kwargs)
TypeError: argument 5 must be impossible<bad format char>, not int

Argument 5 is sasl_flags, which seems to be ldap.SASL_QUIET by default.  The 
TypeError output changes when I send sasl_interactive_bind_s different values 
for the sasl_flags argument. 

python-ldap is linked against OpenLDAP-2.2.23 (compiled with SSL and SASL 
support), and ldap.TLS_AVAIL and ldap.SASL_AVAIL both have 1 as their value.  
The OpenLDAP tools work as expected.  python-ldap works as expected when not 
using SASL.  

Has anyone seen similar errors?  What can I try to fix these errors?

Thanks for the help,


More information about the python-ldap mailing list