summaryrefslogtreecommitdiffstats
path: root/src/tools/sss_seed.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 03:58:58 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:49:20 +0100
commit234958be042980242fff6da936af674da877c5ef (patch)
treea2f96f1cf185f950629f0718e9ce69e314c5fada /src/tools/sss_seed.c
parent72aa8e7b1d234b6b68446d42efa1cff22b70c81b (diff)
downloadsssd-234958be042980242fff6da936af674da877c5ef.tar.gz
sssd-234958be042980242fff6da936af674da877c5ef.tar.xz
sssd-234958be042980242fff6da936af674da877c5ef.zip
Refactor single domain initialization
Bring it out of sysdb, which will slowly remove internal dependencies on domains and instead will always require them to be passed by callers.
Diffstat (limited to 'src/tools/sss_seed.c')
-rw-r--r--src/tools/sss_seed.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tools/sss_seed.c b/src/tools/sss_seed.c
index aa11ab510..d3c1cb448 100644
--- a/src/tools/sss_seed.c
+++ b/src/tools/sss_seed.c
@@ -603,7 +603,6 @@ static int seed_init_db(TALLOC_CTX *mem_ctx,
TALLOC_CTX *tmp_ctx = NULL;
char *confdb_path = NULL;
struct confdb_ctx *confdb = NULL;
- struct sysdb_ctx *sysdb = NULL;
struct sss_domain_info *domain = NULL;
int ret = EOK;
@@ -628,8 +627,7 @@ static int seed_init_db(TALLOC_CTX *mem_ctx,
goto done;
}
- ret = sysdb_init_domain_and_sysdb(tmp_ctx, confdb, domain_name,
- DB_PATH, &domain, &sysdb);
+ ret = sssd_domain_init(tmp_ctx, confdb, domain_name, DB_PATH, &domain);
if (ret != EOK) {
SYSDB_VERSION_ERROR(ret);
DEBUG(SSSDBG_CRIT_FAILURE,
@@ -641,8 +639,8 @@ static int seed_init_db(TALLOC_CTX *mem_ctx,
goto done;
}
- *_sysdb = talloc_steal(mem_ctx, sysdb);
*_confdb = talloc_steal(mem_ctx, confdb);
+ *_sysdb = domain->sysdb;
done:
talloc_free(tmp_ctx);