summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-slapi-plugins/topology
diff options
context:
space:
mode:
authorroot <root@vm-058-107.abc.idm.lab.eng.brq.redhat.com>2016-06-22 16:36:15 +0200
committerMartin Basti <mbasti@redhat.com>2016-06-22 17:51:53 +0200
commita76d4402a6bf68245801f6b65d0569c47aad88c6 (patch)
tree63753b87d43ca83f3f5ce97d21daad92e244cd57 /daemons/ipa-slapi-plugins/topology
parent9a8c5c9dfd10ab1c0bb66b5f25bf815a43d45f2a (diff)
downloadfreeipa-a76d4402a6bf68245801f6b65d0569c47aad88c6.tar.gz
freeipa-a76d4402a6bf68245801f6b65d0569c47aad88c6.tar.xz
freeipa-a76d4402a6bf68245801f6b65d0569c47aad88c6.zip
Topology plugins sigsev/heap corruption when adding a managed host
A managed host may handle several ipaReplTopoManagedSuffix. Removing (from the topology) such host, loops over the replicated suffixes array to retrieve, in the hosts list, the host record and delete it. The problem is that a variable used to manage a hosts list is not reset when looking at the next suffix. That will messup the lists, keeping freed elements in the lists. The fix is to reset the variable inside the replicated suffix loop https://fedorahosted.org/freeipa/ticket/5977 Reviewed-By: Ludwig Krispenz <lkrispen@redhat.com>
Diffstat (limited to 'daemons/ipa-slapi-plugins/topology')
-rw-r--r--daemons/ipa-slapi-plugins/topology/topology_cfg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/daemons/ipa-slapi-plugins/topology/topology_cfg.c b/daemons/ipa-slapi-plugins/topology/topology_cfg.c
index 23b8eddfb..a99a2d062 100644
--- a/daemons/ipa-slapi-plugins/topology/topology_cfg.c
+++ b/daemons/ipa-slapi-plugins/topology/topology_cfg.c
@@ -528,6 +528,7 @@ ipa_topo_cfg_host_del(Slapi_Entry *hostentry)
slapi_lock_mutex(replica->repl_lock);
hostnode = replica->hosts;
+ prevnode = NULL;
while (hostnode) {
if (!strcasecmp(hostnode->hostname,delhost)) {
/*remove from list and free*/