diff options
author | Simo Sorce <idra@samba.org> | 2009-02-13 14:17:24 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2009-02-13 14:17:24 -0500 |
commit | 224a0dfad69c2e056f19e2b4865d592f495fb944 (patch) | |
tree | 7a3e266a11ad9f8f6279592dad1d5ee8b901bd0b /server/util | |
parent | b794a3bae0ed6b8ce7e0762a36f0e58d8f8d8776 (diff) | |
download | sssd-224a0dfad69c2e056f19e2b4865d592f495fb944.tar.gz sssd-224a0dfad69c2e056f19e2b4865d592f495fb944.tar.bz2 sssd-224a0dfad69c2e056f19e2b4865d592f495fb944.zip |
Always pass teh database path explicitly, so that test cases can use
throw away databases
Check version and init main db if empty
Diffstat (limited to 'server/util')
-rw-r--r-- | server/util/server.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server/util/server.c b/server/util/server.c index be3c13cc..35e72fa0 100644 --- a/server/util/server.c +++ b/server/util/server.c @@ -240,6 +240,7 @@ int server_setup(const char *name, int flags, struct event_context *event_ctx; struct main_context *ctx; uint16_t stdin_event_flags; + char *conf_db; int ret = EOK; debug_prg_name = strdup(name); @@ -284,7 +285,14 @@ int server_setup(const char *name, int flags, ctx->event_ctx = event_ctx; - ret = confdb_init(ctx, event_ctx, &ctx->confdb_ctx); + conf_db = talloc_asprintf(ctx, "%s/%s", DB_PATH, CONFDB_FILE); + if (conf_db == NULL) { + DEBUG(0,("Out of memory, aborting!\n")); + return ENOMEM; + } + DEBUG(3, ("CONFDB: %s\n", conf_db)); + + ret = confdb_init(ctx, event_ctx, &ctx->confdb_ctx, conf_db); if (ret != EOK) { DEBUG(0,("The confdb initialization failed\n")); return ret; |