>From e84b475fd863b3dff0af6bcf3b2cb3840bcca1e6 Mon Sep 17 00:00:00 2001
From: root <>
Date: Wed, 22 Jun 2016 16:36:15 +0200
Subject: [PATCH] Topology plugins sigsev/heap corruption when adding a managed

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
 daemons/ipa-slapi-plugins/topology/topology_cfg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/daemons/ipa-slapi-plugins/topology/topology_cfg.c b/daemons/ipa-slapi-plugins/topology/topology_cfg.c
index 23b8edd..a99a2d0 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)
         hostnode = replica->hosts;
+        prevnode = NULL;
         while (hostnode) {
             if (!strcasecmp(hostnode->hostname,delhost)) {
                 /*remove from list and free*/

Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA:

Reply via email to