[SSSD] [PATCH] subdomains: first destroy ptask than remove sdom

Jakub Hrozek jhrozek at redhat.com
Wed Oct 23 17:56:41 UTC 2013


On Tue, Oct 22, 2013 at 04:24:04PM +0200, Pavel Březina wrote:

> From 5906f84cf340b925ae63d72e9fcec9b3700f9f14 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina at redhat.com>
> Date: Tue, 22 Oct 2013 16:15:16 +0200
> Subject: [PATCH 1/2] subdomains: first destroy ptask then remove sdom
> 
> be_ptask_destroy was unreachable since sdom is not present
> in the list of sdap domains any more.
> ---
>  src/providers/ipa/ipa_subdomains.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
> index 6b88bc69bf069cc531785e7e569484e8d8572748..294af47de46b68ea84ec017f734c81fc44556423 100644
> --- a/src/providers/ipa/ipa_subdomains.c
> +++ b/src/providers/ipa/ipa_subdomains.c
> @@ -289,12 +289,12 @@ ipa_ad_subdom_remove(struct ipa_subdomains_ctx *ctx,
>          return;
>      }
>  
> -    sdap_domain_remove(iter->ad_id_ctx->sdap_id_ctx->opts, subdom);
> -    DLIST_REMOVE(ctx->id_ctx->server_mode->trusts, iter);
> -
>      sdom = sdap_domain_get(iter->ad_id_ctx->sdap_id_ctx->opts, subdom);
>      if (sdom == NULL) return;
>      be_ptask_destroy(&sdom->enum_task);
> +
> +    sdap_domain_remove(iter->ad_id_ctx->sdap_id_ctx->opts, subdom);
> +    DLIST_REMOVE(ctx->id_ctx->server_mode->trusts, iter);
>  }
>  
>  const char *get_flat_name_from_subdomain_name(struct be_ctx *be_ctx,
> -- 
> 1.7.11.7
> 

After working around a freeipa bug that didn't allow me to modify multiple
trusts (#3994), I was able to verify the fix works as expected.

ACK



More information about the sssd-devel mailing list