summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-07-09 15:18:28 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-07-10 09:18:06 -0400
commitbd71f19d41272ea8b6dd92c9dc8e101d24eb7cc9 (patch)
treecb16824f9bee7d00caff22365415a08753169343 /src
parent2d257ccf620ce1b611f89cec8f0a94c88c2f2881 (diff)
downloadsssd-bd71f19d41272ea8b6dd92c9dc8e101d24eb7cc9.tar.gz
sssd-bd71f19d41272ea8b6dd92c9dc8e101d24eb7cc9.tar.xz
sssd-bd71f19d41272ea8b6dd92c9dc8e101d24eb7cc9.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/responder/common/responder_common.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index e44c351ad..438ca2cea 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -791,12 +791,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,
@@ -805,6 +799,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"));