]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb: Force use of a private event context in ldb_tdb
authorAndrew Bartlett <abartlet@samba.org>
Fri, 12 May 2017 00:28:02 +0000 (02:28 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 31 May 2017 04:34:26 +0000 (06:34 +0200)
ldb_tdb holds locks while making callbacks, so force the use of a per-request event context

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb/ldb_tdb/ldb_tdb.c

index 3dfd1ccf652a0dc979f78e91e4d1393fb7ab9895..aed6044ab6fe76a8a091bc1c5839bbb7b04d7c42 100644 (file)
@@ -1556,6 +1556,13 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url,
        int tdb_flags, open_flags;
        struct ltdb_private *ltdb;
 
+       /*
+        * We hold locks, so we must use a private event context
+        * on each returned handle
+        */
+
+       ldb_set_require_private_event_context(ldb);
+
        /* parse the url */
        if (strchr(url, ':')) {
                if (strncmp(url, "tdb://", 6) != 0) {