diff options
author | Tomas Babej <tbabej@redhat.com> | 2015-05-06 15:06:56 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2015-05-26 09:52:45 +0200 |
commit | c5f319d3e8d1b5e500225af207ac247f75baea17 (patch) | |
tree | 1973e3208c69ec92f2f65036f88f65523c7b387e /install/tools/ipa-replica-manage | |
parent | d0a330aa1ce250da3ab552f6517945c7cf871ad1 (diff) | |
download | freeipa-c5f319d3e8d1b5e500225af207ac247f75baea17.tar.gz freeipa-c5f319d3e8d1b5e500225af207ac247f75baea17.tar.xz freeipa-c5f319d3e8d1b5e500225af207ac247f75baea17.zip |
replica-manage: Properly delete nested entries
Bad ordering of LDAP entries during replica removal resulted in a failure to
delete replica and its services from cn=masters,cn=ipa,cn=etc,$SUFFIX. This
patch enforces the correct ordering of entries resulting in proper removal of
services before the host entry itself.
https://fedorahosted.org/freeipa/ticket/5019
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'install/tools/ipa-replica-manage')
-rwxr-xr-x | install/tools/ipa-replica-manage | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage index 4f92c0c92..0d2688e6d 100755 --- a/install/tools/ipa-replica-manage +++ b/install/tools/ipa-replica-manage @@ -322,7 +322,7 @@ def del_link(realm, replica1, replica2, dirman_passwd, force=False): ipautil.realm_to_suffix(realm)) entries = repl1.conn.get_entries(dn, repl1.conn.SCOPE_SUBTREE) if entries: - entries.sort(key=len, reverse=True) + entries.sort(key=lambda x: len(x.dn), reverse=True) for entry in entries: repl1.conn.delete_entry(entry) except Exception, e: |