From 70a57924c8e265df1e97b7f0be1adf8da802fbfd Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 18 Oct 2010 14:53:32 -0400 Subject: 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 --- ipaserver/plugins/ldap2.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ipaserver') 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: -- cgit