mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Allow the schema to be set once an ldap connection is locked.
When making LDAP calls via api.Backend.ldap2 the ldap2 object will already be locked by the api.finalize() call. So the first time that api.Backend.ldap2.connect() is called an error would be thrown that self.schema cannot be set because the object is ReadOnly. This uses the documented procedure for working around this lock. This was preventing the DNS installation to proceed. ticket #188
This commit is contained in:
parent
0050e2fcd9
commit
0a47351fd6
@ -292,7 +292,9 @@ class ldap2(CrudBackend, Encoder):
|
||||
_handle_errors(e, **{})
|
||||
|
||||
if self.schema is None and _schema is None:
|
||||
self.schema = get_schema(self.ldap_uri, conn)
|
||||
# explicitly use setattr here so the schema can be set after
|
||||
# the object is finalized.
|
||||
object.__setattr__(self, 'schema', get_schema(self.ldap_uri, conn))
|
||||
return conn
|
||||
|
||||
def destroy_connection(self):
|
||||
|
Loading…
Reference in New Issue
Block a user