summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-12-20 21:26:35 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-12-21 15:10:38 +1100
commit94a59b781ccc5a552a9141484740255977db4637 (patch)
tree9050f24d258f48c5896da75a15e3984c2deda23f /source4/dsdb/samdb
parentbecaa18a46f4ee14d8617c22e78da463fda823b2 (diff)
downloadsamba-94a59b781ccc5a552a9141484740255977db4637.tar.gz
samba-94a59b781ccc5a552a9141484740255977db4637.tar.bz2
samba-94a59b781ccc5a552a9141484740255977db4637.zip
s4-auth Remove event context from privilage database handling
These local TDB operations can quite safely be handled in a new/nested event context, rather than using the main event context. Andrew Bartlett
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/samdb.c3
-rw-r--r--source4/dsdb/samdb/samdb_privilege.c8
2 files changed, 4 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 416cf50396..7ba440006a 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -143,7 +143,6 @@ struct ldb_context *samdb_connect(TALLOC_CTX *mem_ctx,
Create the SID list for this user.
****************************************************************************/
NTSTATUS security_token_create(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct dom_sid *user_sid,
struct dom_sid *group_sid,
@@ -224,7 +223,7 @@ NTSTATUS security_token_create(TALLOC_CTX *mem_ctx,
}
/* setup the privilege mask for this token */
- status = samdb_privilege_setup(ev_ctx, lp_ctx, ptoken);
+ status = samdb_privilege_setup(lp_ctx, ptoken);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(ptoken);
return status;
diff --git a/source4/dsdb/samdb/samdb_privilege.c b/source4/dsdb/samdb/samdb_privilege.c
index 69c4ebea61..c50243c06a 100644
--- a/source4/dsdb/samdb/samdb_privilege.c
+++ b/source4/dsdb/samdb/samdb_privilege.c
@@ -30,10 +30,9 @@
/* connect to the privilege database */
struct ldb_context *privilege_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, "privilege.ldb",
+ return ldb_wrap_connect(mem_ctx, NULL, lp_ctx, "privilege.ldb",
NULL, NULL, 0);
}
@@ -88,8 +87,7 @@ static NTSTATUS samdb_privilege_setup_sid(struct ldb_context *pdb, TALLOC_CTX *m
setup the privilege mask for this security token based on our
local SAM
*/
-NTSTATUS samdb_privilege_setup(struct tevent_context *ev_ctx,
- struct loadparm_context *lp_ctx, struct security_token *token)
+NTSTATUS samdb_privilege_setup(struct loadparm_context *lp_ctx, struct security_token *token)
{
struct ldb_context *pdb;
TALLOC_CTX *mem_ctx;
@@ -113,7 +111,7 @@ NTSTATUS samdb_privilege_setup(struct tevent_context *ev_ctx,
}
mem_ctx = talloc_new(token);
- pdb = privilege_connect(mem_ctx, ev_ctx, lp_ctx);
+ pdb = privilege_connect(mem_ctx, lp_ctx);
if (pdb == NULL) {
talloc_free(mem_ctx);
return NT_STATUS_INTERNAL_DB_CORRUPTION;