From 4140552218c7180d5460c2d76f24733c9fc9188f Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 9 Apr 2014 17:34:15 -0400 Subject: AD Provider: Fix crash looking up forest on Samba 4 We were assuming that the forest had been looked up by netlogon, but this is not available on Samba 4 domains. We need to check that the forest is NULL and force the lookup. Resolves: https://fedorahosted.org/sssd/ticket/2311 Reviewed-by: Sumit Bose (cherry picked from commit 8653b547d6142b69c62daa3cd74c251b2b9aecb7) --- src/providers/ad/ad_subdomains.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c index 3c841788d..a797ceb91 100644 --- a/src/providers/ad/ad_subdomains.c +++ b/src/providers/ad/ad_subdomains.c @@ -587,7 +587,8 @@ static void ad_subdomains_master_dom_done(struct tevent_req *req) goto done; } - if (strcasecmp(ctx->sd_ctx->be_ctx->domain->name, ctx->forest) != 0) { + if (ctx->forest == NULL || + strcasecmp(ctx->sd_ctx->be_ctx->domain->name, ctx->forest) != 0) { DEBUG(SSSDBG_TRACE_FUNC, ("SSSD needs to look up the forest root domain\n")); ret = ad_subdomains_get_root(ctx); -- cgit