From: paul k <pa...@su...> - 2004-04-08 22:38:23
|
Gavin Doughtie wrote: > Does the example below work on your system (or anybody else's on this > list?) Your code looks strange to me but I'm by no means an expert here. I can confirm that if I set my hostname and change digest-md5 to gssapi in the provided sasl_bind.py from the Demo directory, SASL GSSAPI binds work fine against Openldap 2.2.8 with SASL 2.1.17 and both MIT kerberos 1.3.1 and a current heimdal snapshot from late march. Python Versions are 2.2.3 and 2.3.3, python-ldap is pre19, system is linux 2.6 ######### code from sasl_bind.py ################## import ldap, ldap.sasl l = ldap.initialize("ldap://localhost") auth = ldap.sasl.gssapi("") l.sasl_bind_s("", auth) res = l.search_s("dc=nil,dc=b17",ldap.SCOPE_BASE,"(objectClass=*)") print res l.unbind() ######### results ######################### nil python-test # python sasl_bind.py SASL/GSSAPI authentication started SASL username: root@B17 SASL SSF: 56 SASL installing layers [('dc=nil,dc=b17', {'objectClass': ['top', 'dcObject', 'domain', 'domainRelatedObject'], 'associatedDomain': ['nil.b17'], 'dc': ['nil']})] hth Paul |