summaryrefslogtreecommitdiffstats
path: root/src/providers/ad
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2014-04-09 17:34:15 -0400
committerJakub Hrozek <jhrozek@redhat.com>2014-04-10 11:56:15 +0200
commit8653b547d6142b69c62daa3cd74c251b2b9aecb7 (patch)
treed2bc85094df5a0fbe4c2a982e148d5181eaf08aa /src/providers/ad
parent3c11d2418677e889f2eb38e30480e008b04c4140 (diff)
downloadsssd-8653b547d6142b69c62daa3cd74c251b2b9aecb7.tar.gz
sssd-8653b547d6142b69c62daa3cd74c251b2b9aecb7.tar.xz
sssd-8653b547d6142b69c62daa3cd74c251b2b9aecb7.zip
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 <sbose@redhat.com>
Diffstat (limited to 'src/providers/ad')
-rw-r--r--src/providers/ad/ad_subdomains.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
index b191f733b..abcc93cfa 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);