diff options
author | Jan Cholasta <jcholast@redhat.com> | 2013-01-31 11:56:47 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-01 16:59:47 +0100 |
commit | f17aa00ff01e3fff35d3b3ac75f001d076827ec8 (patch) | |
tree | 50fbf505f1e2a35ff6286e3a466c044e9de6afc0 /ipaserver/plugins/ldap2.py | |
parent | 8f46ca5dd20f2e69595dfb3bf9ab11d6f978dfbd (diff) | |
download | freeipa-f17aa00ff01e3fff35d3b3ac75f001d076827ec8.tar.gz freeipa-f17aa00ff01e3fff35d3b3ac75f001d076827ec8.tar.xz freeipa-f17aa00ff01e3fff35d3b3ac75f001d076827ec8.zip |
Aggregate IPASimpleLDAPObject in LDAPEntry.
Diffstat (limited to 'ipaserver/plugins/ldap2.py')
-rw-r--r-- | ipaserver/plugins/ldap2.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py index 360e6e2e2..9483611bd 100644 --- a/ipaserver/plugins/ldap2.py +++ b/ipaserver/plugins/ldap2.py @@ -27,7 +27,6 @@ Backend plugin for LDAP. # binding encodes them into the appropriate representation. This applies to # everything except the CrudBackend methods, where dn is part of the entry dict. -import copy import os import re import pwd @@ -207,7 +206,8 @@ class ldap2(LDAPClient, CrudBackend): try: config_entry = getattr(context, 'config_entry') - return copy.deepcopy(config_entry) + if config_entry.conn is self.conn: + return config_entry.clone() except AttributeError: # Not in our context yet pass @@ -220,11 +220,11 @@ class ldap2(LDAPClient, CrudBackend): raise errors.LimitsExceeded() config_entry = entry[0] except errors.NotFound: - config_entry = {} + config_entry = self.make_entry(cdn) for a in self.config_defaults: if a not in config_entry: config_entry[a] = self.config_defaults[a] - context.config_entry = copy.deepcopy(config_entry) + context.config_entry = config_entry.clone() return config_entry def has_upg(self): |