From 9b64073cf733588b75c3780f2c18728ff3009500 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 23 Apr 2009 14:27:59 +0200 Subject: ldb/samba3: Support event context argument to ldb_init(). This argument is ignored (Samba3's LDB is synchronous) but having it there is useful for API compatibility with the LDB used by Samba 4 and available on some systems. --- source3/lib/ldb/common/ldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/ldb/common/ldb.c') diff --git a/source3/lib/ldb/common/ldb.c b/source3/lib/ldb/common/ldb.c index cef7373c26..0ea80fecfc 100644 --- a/source3/lib/ldb/common/ldb.c +++ b/source3/lib/ldb/common/ldb.c @@ -39,7 +39,7 @@ initialise a ldb context The mem_ctx is optional */ -struct ldb_context *ldb_init(void *mem_ctx) +struct ldb_context *ldb_init(void *mem_ctx, struct tevent_context *tev_ctx) { struct ldb_context *ldb = talloc_zero(mem_ctx, struct ldb_context); int ret; -- cgit From b6981e79dfb22819f48edcd4041b00f9b8cd7a93 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 23 Apr 2009 14:31:45 +0200 Subject: samba3/ldb: Update the ldb_dn API to match that of the Samba 4 LDB: * ldb_dn_new() now takes an initial DN string * ldb_dn_string_compose() -> ldb_dn_new_fmt() * dummy ldb_dn_validate(), since LDB DNs in the current implementation are always valid if they could be created. --- source3/lib/ldb/common/ldb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/ldb/common/ldb.c') diff --git a/source3/lib/ldb/common/ldb.c b/source3/lib/ldb/common/ldb.c index 0ea80fecfc..791c1863d7 100644 --- a/source3/lib/ldb/common/ldb.c +++ b/source3/lib/ldb/common/ldb.c @@ -166,7 +166,7 @@ static const struct ldb_dn *ldb_set_default_basedn(struct ldb_context *ldb) } tmp_ctx = talloc_new(ldb); - ret = ldb_search(ldb, ldb, &res, ldb_dn_new(tmp_ctx), LDB_SCOPE_BASE, + ret = ldb_search(ldb, ldb, &res, ldb_dn_new(tmp_ctx, ldb, NULL), LDB_SCOPE_BASE, attrs, "(objectClass=*)"); if (ret == LDB_SUCCESS) { if (res->count == 1) { @@ -601,7 +601,7 @@ int ldb_build_search_req(struct ldb_request **ret_req, req->operation = LDB_SEARCH; if (base == NULL) { - req->op.search.base = ldb_dn_new(req); + req->op.search.base = ldb_dn_new(req, ldb, NULL); } else { req->op.search.base = base; } -- cgit