The name context was not being initialized for local provider
domains because it was handled after skipping over the back-end
initialization routine. This patch moves the name context init
routine to occur earlier.

Fixes https://fedorahosted.org/sssd/ticket/1412
From a3dd29658cd8fbe9b11d3c3721e5ec73228b1ca5 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgall...@redhat.com>
Date: Mon, 9 Jul 2012 15:18:28 -0400
Subject: [PATCH] Fix segfault when using local provider

The name context was not being initialized for local provider
domains because it was handled after skipping over the back-end
initialization routine. This patch moves the name context init
routine to occur earlier.

https://fedorahosted.org/sssd/ticket/1412
---
 src/responder/common/responder_common.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index e55774038139ae7099bd3f78687d8274f8e48d97..e09c6a0e976c38ee09a4fca8b3c438047414615a 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -663,12 +663,6 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
     }
 
     for (dom = rctx->domains; dom; dom = dom->next) {
-
-        /* skip local domain, it doesn't have a backend */
-        if (strcasecmp(dom->provider, "local") == 0) {
-            continue;
-        }
-
         ret = sss_names_init(rctx->cdb, rctx->cdb, dom->name, &dom->names);
         if (ret != EOK) {
             DEBUG(SSSDBG_FATAL_FAILURE,
@@ -677,6 +671,11 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
             return ret;
         }
 
+        /* skip local domain, it doesn't have a backend */
+        if (strcasecmp(dom->provider, "local") == 0) {
+            continue;
+        }
+
         ret = sss_dp_init(rctx, dp_intf, cli_name, dom);
         if (ret != EOK) {
             DEBUG(0, ("fatal error setting up backend connector\n"));
-- 
1.7.10.4

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to