From: Andrew Bartlett Date: Fri, 12 May 2017 00:28:02 +0000 (+0200) Subject: ldb: Force use of a private event context in ldb_tdb X-Git-Tag: ldb-1.1.30~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25795c3da920adba845367bf3394b5ba5912c1d5;p=thirdparty%2Fsamba.git ldb: Force use of a private event context in ldb_tdb ldb_tdb holds locks while making callbacks, so force the use of a per-request event context Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher Reviewed-by: Garming Sam --- diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c index 3dfd1ccf652..aed6044ab6f 100644 --- a/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/lib/ldb/ldb_tdb/ldb_tdb.c @@ -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) {