From 9c3d4dff828574263f4f2ff3632c08af387a01f1 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 17 Jun 2010 09:35:52 +0200 Subject: s3:idmap_tdb: prevent opening the idmap db more than once. --- source3/winbindd/idmap_tdb.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/winbindd') diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index 86bb018bb0..8bb615d8f8 100644 --- a/source3/winbindd/idmap_tdb.c +++ b/source3/winbindd/idmap_tdb.c @@ -268,6 +268,11 @@ static NTSTATUS idmap_tdb_open_db(struct idmap_domain *dom) ctx = talloc_get_type(dom->private_data, struct idmap_tdb_context); + if (ctx->db) { + /* it is already open */ + return NT_STATUS_OK; + } + /* use our own context here */ mem_ctx = talloc_stackframe(); -- cgit