diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-06 03:58:58 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-15 10:49:20 +0100 |
commit | 234958be042980242fff6da936af674da877c5ef (patch) | |
tree | a2f96f1cf185f950629f0718e9ce69e314c5fada /src/db | |
parent | 72aa8e7b1d234b6b68446d42efa1cff22b70c81b (diff) | |
download | sssd-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/db')
-rw-r--r-- | src/db/sysdb.c | 31 | ||||
-rw-r--r-- | src/db/sysdb.h | 7 |
2 files changed, 0 insertions, 38 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c index 8b200b01b..f68c30acd 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -1242,37 +1242,6 @@ int sysdb_domain_init(TALLOC_CTX *mem_ctx, db_path, false, _ctx); } -errno_t sysdb_init_domain_and_sysdb(TALLOC_CTX *mem_ctx, - struct confdb_ctx *cdb, - const char *domain_name, - const char *db_path, - struct sss_domain_info **_domain, - struct sysdb_ctx **_ctx) -{ - int ret; - struct sss_domain_info *dom; - struct sysdb_ctx *ctx; - - ret = confdb_get_domain(cdb, domain_name, &dom); - if (ret != EOK) { - DEBUG(SSSDBG_OP_FAILURE, ("Error retrieving domain configuration.\n")); - return ret; - } - - ret = sysdb_domain_init(mem_ctx, dom, db_path, &ctx); - if (ret != EOK) { - DEBUG(SSSDBG_OP_FAILURE, ("Error opening cache database.\n")); - return ret; - } - - dom->sysdb = talloc_steal(dom, ctx); - - *_domain = dom; - *_ctx = ctx; - - return EOK; -} - int compare_ldb_dn_comp_num(const void *m1, const void *m2) { struct ldb_message *msg1 = talloc_get_type(*(void **) discard_const(m1), diff --git a/src/db/sysdb.h b/src/db/sysdb.h index d191dd3d2..10eec5e6a 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -455,13 +455,6 @@ int sysdb_domain_init(TALLOC_CTX *mem_ctx, const char *db_path, struct sysdb_ctx **_ctx); -errno_t sysdb_init_domain_and_sysdb(TALLOC_CTX *mem_ctx, - struct confdb_ctx *cdb, - const char *domain_name, - const char *db_path, - struct sss_domain_info **_domain, - struct sysdb_ctx **_ctx); - /* functions to retrieve information from sysdb * These functions automatically starts an operation * therefore they cannot be called within a transaction */ |