summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins/ldap2.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-10-18 14:53:32 -0400
committerSimo Sorce <ssorce@redhat.com>2010-10-28 08:39:10 -0400
commit70a57924c8e265df1e97b7f0be1adf8da802fbfd (patch)
tree40731984730ee48d8161e0cca67c34581e55d246 /ipaserver/plugins/ldap2.py
parent93290c8a72bcd5c4ab34eedf0ec443469b36f8c1 (diff)
downloadfreeipa-70a57924c8e265df1e97b7f0be1adf8da802fbfd.tar.gz
freeipa-70a57924c8e265df1e97b7f0be1adf8da802fbfd.tar.xz
freeipa-70a57924c8e265df1e97b7f0be1adf8da802fbfd.zip
Allow RDN changes for users, groups, rolegroups and taskgroups.
To do a change right now you have to perform a setattr like: ipa user-mod --setattr uid=newuser olduser The RDN change is performed before the rest of the mods. If the RDN change is the only change done then the EmptyModlist that update_entry() throws is ignored. ticket 323
Diffstat (limited to 'ipaserver/plugins/ldap2.py')
-rw-r--r--ipaserver/plugins/ldap2.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py
index 05292ce7c..4117e47b7 100644
--- a/ipaserver/plugins/ldap2.py
+++ b/ipaserver/plugins/ldap2.py
@@ -681,6 +681,8 @@ class ldap2(CrudBackend, Encoder):
del_old -- delete old RDN value (default True)
"""
dn = self.normalize_dn(dn)
+ if dn.startswith(new_rdn + ","):
+ raise errors.EmptyModlist()
try:
self.conn.rename_s(dn, new_rdn, delold=int(del_old))
except _ldap.LDAPError, e: