summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/baseldap.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-01-24 10:46:44 -0500
committerRob Crittenden <rcritten@redhat.com>2011-01-24 14:35:11 -0500
commit678c764d408856dc6a71d7fda92611bef96a22a2 (patch)
tree3b339b25d9bee3fbaf131d0171ba9b7f23cbda29 /ipalib/plugins/baseldap.py
parent96469fbc886bb53a898396ad030a48609f147160 (diff)
downloadfreeipa-678c764d408856dc6a71d7fda92611bef96a22a2.tar.gz
freeipa-678c764d408856dc6a71d7fda92611bef96a22a2.tar.xz
freeipa-678c764d408856dc6a71d7fda92611bef96a22a2.zip
Make a copy of objectclasses so a call can't update them globally.
In the host plugin we may change the default objectclasses based on the options selected. This was affecting it globally and causing subsequent calls to fail.
Diffstat (limited to 'ipalib/plugins/baseldap.py')
-rw-r--r--ipalib/plugins/baseldap.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index e7ccb7724..27e543d03 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -23,6 +23,7 @@ Base classes for LDAP plugins.
import re
import json
import time
+from copy import deepcopy
from ipalib import api, crud, errors
from ipalib import Method, Object
@@ -504,7 +505,7 @@ class LDAPCreate(CallbackInterface, crud.Create):
ldap = self.obj.backend
entry_attrs = self.args_options_2_entry(*keys, **options)
- entry_attrs['objectclass'] = self.obj.object_class
+ entry_attrs['objectclass'] = deepcopy(self.obj.object_class)
if self.obj.object_class_config:
config = ldap.get_ipa_config()[1]