Use wrapper for sasl gssapi binds so it behaves like other binds

By calling directly sasl_interactive_bind_s() we were not calling __lateinit()
This in turn resulted in some variables like dbdir not to be set on the
IPAadmin object.
Keep all bind types in the same place so the same common sbind steps can be
performed in each case.

Related to: https://fedorahosted.org/freeipa/ticket/1022
This commit is contained in:
Simo Sorce
2011-02-25 18:37:45 -05:00
parent 09dd05b49a
commit 2028695d88
4 changed files with 13 additions and 12 deletions

View File

@@ -142,7 +142,7 @@ def list_masters(realm, host, replica, dirman_passwd, verbose):
if dirman_passwd:
conn.do_simple_bind(bindpw=dirman_passwd)
else:
conn.sasl_interactive_bind_s('', ipaldap.sasl_auth)
conn.do_sasl_gssapi_bind()
dn = 'cn=masters,cn=ipa,cn=etc,%s' % util.realm_to_suffix(realm)
entries = conn.search_s(dn, ldap.SCOPE_ONELEVEL)