From 2ba16c5a5c4b6d3cd2a44179186ec60eda828bcd Mon Sep 17 00:00:00 2001 From: Michal Zidek Date: Mar 05 2013 16:41:56 +0000 Subject: Remove the alt_db_path parameter of sysdb_init This parameter was never used. https://fedorahosted.org/sssd/ticket/1765 --- diff --git a/src/db/sysdb.c b/src/db/sysdb.c index 7c34791..da5dbe8 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -1207,23 +1207,15 @@ done: int sysdb_init(TALLOC_CTX *mem_ctx, struct sss_domain_info *domains, - const char *alt_db_path, bool allow_upgrade) { struct sss_domain_info *dom; struct sysdb_ctx *sysdb; - const char *db_path; int ret; - if (alt_db_path) { - db_path = alt_db_path; - } else { - db_path = DB_PATH; - } - if (allow_upgrade) { /* check if we have an old sssd.ldb to upgrade */ - ret = sysdb_check_upgrade_02(domains, db_path); + ret = sysdb_check_upgrade_02(domains, DB_PATH); if (ret != EOK) { return ret; } @@ -1232,7 +1224,7 @@ int sysdb_init(TALLOC_CTX *mem_ctx, /* open a db for each domain */ for (dom = domains; dom; dom = dom->next) { - ret = sysdb_domain_init_internal(mem_ctx, dom, db_path, + ret = sysdb_domain_init_internal(mem_ctx, dom, DB_PATH, allow_upgrade, &sysdb); if (ret != EOK) { return ret; diff --git a/src/db/sysdb.h b/src/db/sysdb.h index 23cbbb0..fb5e645 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -385,7 +385,6 @@ errno_t sysdb_update_ranges(struct sysdb_ctx *sysdb, * the sysdb ctx */ int sysdb_init(TALLOC_CTX *mem_ctx, struct sss_domain_info *domains, - const char *alt_db_path, bool allow_upgrade); /* used to initialize only one domain database. * Do NOT use if sysdb_init has already been called */ diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 2c8cdb6..c7d6d3e 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -2211,7 +2211,7 @@ int monitor_process_init(struct mt_ctx *ctx, if (!tmp_ctx) { return ENOMEM; } - ret = sysdb_init(tmp_ctx, ctx->domains, NULL, true); + ret = sysdb_init(tmp_ctx, ctx->domains, true); if (ret != EOK) { SYSDB_VERSION_ERROR_DAEMON(ret); return ret; diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c index 3bb7b60..824c649 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, rctx->domains, NULL, false); + ret = sysdb_init(rctx, rctx->domains, false); if (ret != EOK) { SYSDB_VERSION_ERROR_DAEMON(ret); DEBUG(0, ("fatal error initializing resp_ctx\n")); diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c index db6c792..ec09662 100644 --- a/src/tools/sss_cache.c +++ b/src/tools/sss_cache.c @@ -437,7 +437,7 @@ errno_t init_domains(struct cache_tool_ctx *ctx, const char *domain) return ret; } - ret = sysdb_init(ctx, ctx->domains, NULL, false); + ret = sysdb_init(ctx, ctx->domains, false); SYSDB_VERSION_ERROR(ret); if (ret != EOK) { DEBUG(1, ("Could not initialize connection to the sysdb\n"));