summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 03:16:08 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:49:20 +0100
commit72aa8e7b1d234b6b68446d42efa1cff22b70c81b (patch)
treeb712144660ce3eb931a173fc2d98f00031ca6a52 /src/responder
parentf2ce4a4a45bfc0c9ba6d1a13348494dd4c49d4fb (diff)
downloadsssd-72aa8e7b1d234b6b68446d42efa1cff22b70c81b.tar.gz
sssd-72aa8e7b1d234b6b68446d42efa1cff22b70c81b.tar.xz
sssd-72aa8e7b1d234b6b68446d42efa1cff22b70c81b.zip
Refactor sysdb initialization
Change the way sysdbs are initialized. Make callers responsible for providing the list of domains. Remove the returned array of sysdb contexts, it was used only by sss_cache and not really necessary there either as that tool can easily iterate the domains. Make sysdb ctx children of their respective domains. Neither sysdb context nor domains are ever freed until a program is done so there shouldn't be any memory hierarchy issue. As plus we simplify the code by removing a destructor and a setter function.
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/common/responder.h1
-rw-r--r--src/responder/common/responder_common.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/responder/common/responder.h b/src/responder/common/responder.h
index 2903aac00..a265d61d9 100644
--- a/src/responder/common/responder.h
+++ b/src/responder/common/responder.h
@@ -88,7 +88,6 @@ struct resp_ctx {
struct sss_domain_info *domains;
int domains_timeout;
int client_idle_timeout;
- struct sysdb_ctx_list *db_list;
struct sss_cmd_table *sss_cmds;
const char *sss_pipe_name;
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 35381be8a..9defdba46 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -838,7 +838,7 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
}
}
- ret = sysdb_init(rctx, cdb, NULL, false, &rctx->db_list);
+ ret = sysdb_init(rctx, rctx->domains, NULL, false);
if (ret != EOK) {
SYSDB_VERSION_ERROR_DAEMON(ret);
DEBUG(0, ("fatal error initializing resp_ctx\n"));