From 5b264561e7959019974d6934af7568891a1d2c99 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 16 Jun 2010 15:08:16 +0200 Subject: s3:idmap_tdb2: open the db after loading the ranges in idmap_tdb2_db_init(). --- source3/winbindd/idmap_tdb2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c index 1db880a48b..f7935fb3b9 100644 --- a/source3/winbindd/idmap_tdb2.c +++ b/source3/winbindd/idmap_tdb2.c @@ -329,9 +329,6 @@ static NTSTATUS idmap_tdb2_db_init(struct idmap_domain *dom, struct idmap_tdb2_context *ctx; NTSTATUS status; - status = idmap_tdb2_open_db(); - NT_STATUS_NOT_OK_RETURN(status); - ctx = talloc(dom, struct idmap_tdb2_context); if ( ! ctx) { DEBUG(0, ("Out of memory!\n")); @@ -393,6 +390,11 @@ static NTSTATUS idmap_tdb2_db_init(struct idmap_domain *dom, ctx->filter_high_id = 0; } + ret = idmap_tdb2_open_db(); + if (!NT_STATUS_IS_OK(ret)) { + goto failed; + } + dom->private_data = ctx; return NT_STATUS_OK; -- cgit