From 72aa8e7b1d234b6b68446d42efa1cff22b70c81b Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 6 Jan 2013 03:16:08 -0500 Subject: 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. --- src/responder/common/responder_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/responder/common/responder_common.c') diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c index 35381be8..9defdba4 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")); -- cgit