git.samba.org
/
amitay
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s3:idmap_tdb: prevent opening the idmap db more than once.
[amitay/samba.git]
/
source3
/
winbindd
/
idmap_tdb.c
diff --git
a/source3/winbindd/idmap_tdb.c
b/source3/winbindd/idmap_tdb.c
index 86bb018bb0c20f202151eb2766aae1d7a1a66e2d..8bb615d8f8ddcdb3c8b72200ba397076a6a3dcbe 100644
(file)
--- 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);
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();
/* use our own context here */
mem_ctx = talloc_stackframe();