mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Return copy of config from ipa_get_config()
It was discovered that using the batch plugin it was possible to store duplicate data in parts of the ipa_config during iterations. This was causing a cascading exec failures if any one of the batch executions failed. https://fedorahosted.org/freeipa/ticket/1220
This commit is contained in:
committed by
Rob Crittenden
parent
55f9836cb6
commit
756d61724e
@@ -639,7 +639,7 @@ class ldap2(CrudBackend, Encoder):
|
||||
cdn = "%s,%s" % (api.Object.config.get_dn(), api.env.basedn)
|
||||
try:
|
||||
config_entry = getattr(context, 'config_entry')
|
||||
return (cdn, config_entry)
|
||||
return (cdn, copy.deepcopy(config_entry))
|
||||
except AttributeError:
|
||||
# Not in our context yet
|
||||
pass
|
||||
@@ -653,7 +653,7 @@ class ldap2(CrudBackend, Encoder):
|
||||
for a in self.config_defaults:
|
||||
if a not in config_entry:
|
||||
config_entry[a] = self.config_defaults[a]
|
||||
setattr(context, 'config_entry', config_entry)
|
||||
setattr(context, 'config_entry', copy.deepcopy(config_entry))
|
||||
return (cdn, config_entry)
|
||||
|
||||
def get_schema(self):
|
||||
|
||||
Reference in New Issue
Block a user