summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorJr Aquino <jr.aquino@citrix.com>2011-05-12 14:59:22 -0700
committerRob Crittenden <rcritten@redhat.com>2011-05-13 13:09:24 -0400
commit756d61724e28663f9e8a4d30c01c169f66c739c0 (patch)
tree4b2c9ffae4035a5190a3bb212c826af0b97464d1 /ipaserver
parent55f9836cb62612e75bf4ae3072a0da5af3caa7dc (diff)
downloadfreeipa-756d61724e28663f9e8a4d30c01c169f66c739c0.tar.gz
freeipa-756d61724e28663f9e8a4d30c01c169f66c739c0.tar.xz
freeipa-756d61724e28663f9e8a4d30c01c169f66c739c0.zip
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
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/plugins/ldap2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py
index 48629c0b4..58a9ab4f1 100644
--- a/ipaserver/plugins/ldap2.py
+++ b/ipaserver/plugins/ldap2.py
@@ -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):