summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-05-17 08:47:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:34 -0500
commitc42219d7352bd2e7a6413f7ae1cd0fd5cded1d95 (patch)
treec45f3949f0e5f434f129c6346a99d3fa0aab96df /source4/dsdb/samdb
parentad1cde253e5938acf2c57458b5af04f32f45edbf (diff)
downloadsamba-c42219d7352bd2e7a6413f7ae1cd0fd5cded1d95.tar.gz
samba-c42219d7352bd2e7a6413f7ae1cd0fd5cded1d95.tar.bz2
samba-c42219d7352bd2e7a6413f7ae1cd0fd5cded1d95.zip
r22969: fix some more places where we could end up with more than one event
context. We now have an event context on the torture_context, and we can also get one from the cli_credentials structure (This used to be commit c0f65eb6562e13530337c23e3447a6aa6eb8fc17)
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/cracknames.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c
index eec27c6668..2e26f1c308 100644
--- a/source4/dsdb/samdb/cracknames.c
+++ b/source4/dsdb/samdb/cracknames.c
@@ -348,7 +348,9 @@ WERROR DsCrackNameOneName(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
struct ldb_dn *name_dn = NULL;
struct smb_krb5_context *smb_krb5_context;
- ret = smb_krb5_init_context(mem_ctx, &smb_krb5_context);
+ ret = smb_krb5_init_context(mem_ctx,
+ ldb_get_opaque(sam_ctx, "EventContext"),
+ &smb_krb5_context);
if (ret) {
return WERR_NOMEM;
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 780dc69b23..2db76f8439 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -1430,7 +1430,9 @@ static int password_hash_add_do_add(struct ldb_handle *h) {
}
/* Some operations below require kerberos contexts */
- if (smb_krb5_init_context(ac->down_req, &smb_krb5_context) != 0) {
+ if (smb_krb5_init_context(ac->down_req,
+ ldb_get_opaque(h->module->ldb, "EventContext"),
+ &smb_krb5_context) != 0) {
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -1760,7 +1762,9 @@ static int password_hash_mod_do_mod(struct ldb_handle *h) {
msg->dn = ac->orig_req->op.mod.message->dn;
/* Some operations below require kerberos contexts */
- if (smb_krb5_init_context(ac->mod_req, &smb_krb5_context) != 0) {
+ if (smb_krb5_init_context(ac->mod_req,
+ ldb_get_opaque(h->module->ldb, "EventContext"),
+ &smb_krb5_context) != 0) {
return LDB_ERR_OPERATIONS_ERROR;
}