summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-16 15:08:16 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:42 +0200
commit5b264561e7959019974d6934af7568891a1d2c99 (patch)
tree5fa2206e02fa49c1d9dffd65b3ef5bcb362cd39f
parent8da3d7c39be33899b29276cb2778cb9e1771bb6e (diff)
downloadsamba-5b264561e7959019974d6934af7568891a1d2c99.tar.gz
samba-5b264561e7959019974d6934af7568891a1d2c99.tar.bz2
samba-5b264561e7959019974d6934af7568891a1d2c99.zip
s3:idmap_tdb2: open the db after loading the ranges in idmap_tdb2_db_init().
-rw-r--r--source3/winbindd/idmap_tdb2.c8
1 files 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;