summaryrefslogtreecommitdiffstats
path: root/source4/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-10-11 16:43:07 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-10-11 13:02:15 +0000
commit5cd9495fb3f74d8e896c81e5c060a1643722870e (patch)
treeaccf27ddb2a3e04abe2a10b8340c7ff08ccfee34 /source4/param
parentbaeaa179868fedb797df811bdf4d4a87bf604b8c (diff)
downloadsamba-5cd9495fb3f74d8e896c81e5c060a1643722870e.tar.gz
samba-5cd9495fb3f74d8e896c81e5c060a1643722870e.tar.xz
samba-5cd9495fb3f74d8e896c81e5c060a1643722870e.zip
s4-param Refactor secrets code to not require an event context.
A new event context is constructed by LDB when required for secrets.ldb This will be essentially unused, as LDB on TDB will only trigger 'fake' events, and blocks on transactions and lock operations anyway. Andrew Bartlett
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/provision.c2
-rw-r--r--source4/param/secrets.c6
-rw-r--r--source4/param/secrets.h3
3 files changed, 4 insertions, 7 deletions
diff --git a/source4/param/provision.c b/source4/param/provision.c
index fd97f69cb35..71405507ba8 100644
--- a/source4/param/provision.c
+++ b/source4/param/provision.c
@@ -233,7 +233,7 @@ NTSTATUS provision_store_self_join(TALLOC_CTX *mem_ctx, struct loadparm_context
}
/* Open the secrets database */
- ldb = secrets_db_connect(tmp_mem, event_ctx, lp_ctx);
+ ldb = secrets_db_connect(tmp_mem, lp_ctx);
if (!ldb) {
*error_string
= talloc_asprintf(mem_ctx,
diff --git a/source4/param/secrets.c b/source4/param/secrets.c
index c894358e2dc..d87264a9609 100644
--- a/source4/param/secrets.c
+++ b/source4/param/secrets.c
@@ -86,10 +86,9 @@ struct tdb_wrap *secrets_init(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_c
connect to the secrets ldb
*/
struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx)
{
- return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, lpcfg_secrets_url(lp_ctx),
+ return ldb_wrap_connect(mem_ctx, NULL, lp_ctx, lpcfg_secrets_url(lp_ctx),
NULL, NULL, 0);
}
@@ -98,7 +97,6 @@ struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx,
* @return pointer to a SID object if the SID could be obtained, NULL otherwise
*/
struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
const char *domain,
enum netr_SchannelType *sec_channel_type,
@@ -114,7 +112,7 @@ struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
*errstring = NULL;
- ldb = secrets_db_connect(mem_ctx, ev_ctx, lp_ctx);
+ ldb = secrets_db_connect(mem_ctx, lp_ctx);
if (ldb == NULL) {
DEBUG(5, ("secrets_db_connect failed\n"));
return NULL;
diff --git a/source4/param/secrets.h b/source4/param/secrets.h
index 49fe8c31c7c..d9e0f53f0fa 100644
--- a/source4/param/secrets.h
+++ b/source4/param/secrets.h
@@ -43,9 +43,8 @@ struct ldb_message;
struct ldb_context;
struct tdb_wrap *secrets_init(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
-struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx);
+struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
const char *domain,
enum netr_SchannelType *sec_channel_type,