diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-10-11 16:43:07 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-10-11 13:02:15 +0000 |
commit | 5cd9495fb3f74d8e896c81e5c060a1643722870e (patch) | |
tree | accf27ddb2a3e04abe2a10b8340c7ff08ccfee34 /source4/param | |
parent | baeaa179868fedb797df811bdf4d4a87bf604b8c (diff) | |
download | samba-5cd9495fb3f74d8e896c81e5c060a1643722870e.tar.gz samba-5cd9495fb3f74d8e896c81e5c060a1643722870e.tar.bz2 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.c | 2 | ||||
-rw-r--r-- | source4/param/secrets.c | 6 | ||||
-rw-r--r-- | source4/param/secrets.h | 3 |
3 files changed, 4 insertions, 7 deletions
diff --git a/source4/param/provision.c b/source4/param/provision.c index fd97f69cb3..71405507ba 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 c894358e2d..d87264a960 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 49fe8c31c7..d9e0f53f0f 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, |