summaryrefslogtreecommitdiff
path: root/server/monitor
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-09-03 19:29:41 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-09-08 15:10:50 -0400
commit28d9dcbeabdf919506fe59e9d1cbed84fbd6e649 (patch)
tree3d5d878b1adc0ec8af94a52359d219689c763bd8 /server/monitor
parentaef967dc115c64f0288b8ecc3ff1d927aa42af70 (diff)
downloadsssd-28d9dcbeabdf919506fe59e9d1cbed84fbd6e649.tar.gz
sssd-28d9dcbeabdf919506fe59e9d1cbed84fbd6e649.tar.bz2
sssd-28d9dcbeabdf919506fe59e9d1cbed84fbd6e649.zip
Split database in multiple files
The special persistent local database retains the original name. All other backends now have their own cache-NAME.ldb file.
Diffstat (limited to 'server/monitor')
-rw-r--r--server/monitor/monitor.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index 893de9b1..86b2364c 100644
--- a/server/monitor/monitor.c
+++ b/server/monitor/monitor.c
@@ -866,7 +866,7 @@ int get_monitor_config(struct mt_ctx *ctx)
if(!ctx->domain_ctx) {
return ENOMEM;
}
- ret = confdb_get_domains(ctx->cdb, ctx->domain_ctx, &ctx->domains);
+ ret = confdb_get_domains(ctx->cdb, &ctx->domains);
if (ret != EOK) {
DEBUG(0, ("No domains configured.\n"));
return ret;
@@ -1780,7 +1780,7 @@ int monitor_process_init(TALLOC_CTX *mem_ctx,
const char *config_file)
{
struct mt_ctx *ctx;
- struct sysdb_ctx *sysdb;
+ struct sysdb_ctx_list *db_list;
struct tevent_signal *tes;
int ret, i;
char *cdb_file;
@@ -1860,19 +1860,16 @@ int monitor_process_init(TALLOC_CTX *mem_ctx,
return ret;
}
- /* Avoid a startup race condition between InfoPipe
- * and NSS. If the sysdb doesn't exist yet, both
- * will try to create it at the same time. So
- * we'll have the monitor create it before either of
- * those processes start.
+ /* Avoid a startup race condition between process.
+ * We need to handle DB upgrades or DB creation only
+ * in one process before all other start.
*/
- ret = sysdb_init(mem_ctx, ctx->ev, ctx->cdb,
- NULL, &sysdb);
+ ret = sysdb_init(mem_ctx, ctx->ev, ctx->cdb, NULL, true, &db_list);
if (ret != EOK) {
talloc_free(ctx);
return ret;
}
- talloc_free(sysdb);
+ talloc_free(db_list);
/* Initialize D-BUS Server
* The monitor will act as a D-BUS server for all