From d36a52f35eb0d80f32f8e8fc916b3e6ce009618e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 31 Oct 2011 16:27:55 -0400 Subject: RHEL6: Handle absence of sysdb_ldb_connect --- src/db/sysdb.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/db/sysdb.c b/src/db/sysdb.c index 3fe013648..009e49d4e 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -1922,10 +1922,22 @@ static int sysdb_domain_init_internal(TALLOC_CTX *mem_ctx, * any changes made above take effect. */ talloc_zfree(ctx->ldb); - ret = sysdb_ldb_connect(ctx, ctx->ldb_file, &ctx->ldb); - if (ret != EOK) { - DEBUG(1, ("sysdb_ldb_connect failed.\n")); + + ctx->ldb = ldb_init(ctx, NULL); + if (!ctx->ldb) { + return EIO; + } + + ret = ldb_set_debug(ctx->ldb, ldb_debug_messages, NULL); + if (ret != LDB_SUCCESS) { + return EIO; } + + ret = ldb_connect(ctx->ldb, ctx->ldb_file, 0, NULL); + if (ret != LDB_SUCCESS) { + return EIO; + } + goto done; } } -- cgit