s3:idmap_tdb: prevent opening the idmap db more than once.
authorMichael Adam <obnox@samba.org>
Thu, 17 Jun 2010 07:35:52 +0000 (09:35 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 23 Jun 2010 10:22:16 +0000 (12:22 +0200)
source3/winbindd/idmap_tdb.c

index 831db9d05c390bd1d47673a9d50f4db627a1c5e9..ec5be5d32ef76a5417b7715b1d69fc80e0ecf317 100644 (file)
@@ -269,6 +269,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();