summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_tdb.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-17 09:35:52 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:52 +0200
commit9c3d4dff828574263f4f2ff3632c08af387a01f1 (patch)
treead1a1c508361b22281d7ba76a76a6c284c2f60ec /source3/winbindd/idmap_tdb.c
parent66a38d8612733427637b13c721dd474389b7cc90 (diff)
downloadsamba-9c3d4dff828574263f4f2ff3632c08af387a01f1.tar.gz
samba-9c3d4dff828574263f4f2ff3632c08af387a01f1.tar.bz2
samba-9c3d4dff828574263f4f2ff3632c08af387a01f1.zip
s3:idmap_tdb: prevent opening the idmap db more than once.
Diffstat (limited to 'source3/winbindd/idmap_tdb.c')
-rw-r--r--source3/winbindd/idmap_tdb.c5
1 files changed, 5 insertions, 0 deletions
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();