未验证 提交 32eb3e7e 编写于 作者: A Ansgar

`ldap.open` is now `ldap.initialize`

上级 5de1e620
......@@ -931,7 +931,7 @@ class Keyring(object):
LDAPServer = cnf["Import-LDAP-Fingerprints::LDAPServer"]
ca_cert_file = cnf.get('Import-LDAP-Fingerprints::CACertFile')
l = ldap.open(LDAPServer)
l = ldap.initialize(LDAPServer)
if ca_cert_file:
l.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_HARD)
......
......@@ -778,7 +778,7 @@ def get_logins_from_ldap(fingerprint='*'):
LDAPDn = Cnf['Import-LDAP-Fingerprints::LDAPDn']
LDAPServer = Cnf['Import-LDAP-Fingerprints::LDAPServer']
l = ldap.open(LDAPServer)
l = ldap.initialize(LDAPServer)
l.simple_bind_s('', '')
Attrs = l.search_s(LDAPDn, ldap.SCOPE_ONELEVEL,
'(keyfingerprint=%s)' % fingerprint,
......@@ -796,7 +796,7 @@ def get_users_from_ldap():
LDAPDn = Cnf['Import-LDAP-Fingerprints::LDAPDn']
LDAPServer = Cnf['Import-LDAP-Fingerprints::LDAPServer']
l = ldap.open(LDAPServer)
l = ldap.initialize(LDAPServer)
l.simple_bind_s('', '')
Attrs = l.search_s(LDAPDn, ldap.SCOPE_ONELEVEL,
'(uid=*)', ['uid', 'cn', 'mn', 'sn'])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册