mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Make ldap2 class work as a client library as well.
Move the user-private group caching code out of the global config and determine the value the first time it is needed. Renamed global_init() back to get_schema() and make it take an optional connection. This solves the problem of being able to do all operations with a simple bind instead of GSSAPI. Moved the global get_syntax() into a class method so that a schema can be passed in. If a schema wasn't loaded during the module import then it is loaded when the connection is created (so we have the credntials needed for binding). ticket 63
This commit is contained in:
@@ -123,7 +123,7 @@ def has_managed_entries(host_name, dm_password):
|
||||
conn = ldap2(shared_instance=False, ldap_uri=ldapuri, base_dn='cn=config')
|
||||
conn.connect(bind_dn='cn=Directory Manager', bind_pw=dm_password)
|
||||
(dn, attrs) = conn.get_entry('cn=Managed Entries,cn=plugins',
|
||||
['*'])
|
||||
['*'], time_limit=2, size_limit=3000)
|
||||
return True
|
||||
except errors.NotFound:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user