summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2022-07-26 10:59:13 +0200
committerJule Anger <janger@samba.org>2022-09-18 16:46:09 +0000
commitf7f1106b2edafc25ddd9c6f98b04c048e1c85dd4 (patch)
treee6bb0d507161bb0645bcd1738b814cd564ca8e15
parentc56e2e2e700cb1b4a75f5bb3224ecf4657dd2a99 (diff)
downloadsamba-f7f1106b2edafc25ddd9c6f98b04c048e1c85dd4.tar.gz
s4:rpc_server: Use sam_ctx consistently in dcesrv_samr_SetUserInfo()
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 1b3d7f811680f9ac66ca5822950b3eee081a06b0)
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index ccb4e37bf31..15ca7cf039a 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -3706,7 +3706,7 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
case 18:
status = samr_set_password_buffers(dce_call,
- a_state->sam_ctx,
+ sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
@@ -3808,7 +3808,7 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
nt_pwd_hash = (uint8_t *) r->in.info->info21.nt_owf_password.array;
}
status = samr_set_password_buffers(dce_call,
- a_state->sam_ctx,
+ sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
@@ -3894,14 +3894,14 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
IFSET(SAMR_FIELD_NT_PASSWORD_PRESENT) {
status = samr_set_password(dce_call,
- a_state->sam_ctx,
+ sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
&r->in.info->info23.password);
} else IFSET(SAMR_FIELD_LM_PASSWORD_PRESENT) {
status = samr_set_password(dce_call,
- a_state->sam_ctx,
+ sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
@@ -3931,7 +3931,7 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
/* the set password levels are handled separately */
case 24:
status = samr_set_password(dce_call,
- a_state->sam_ctx,
+ sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
@@ -4007,14 +4007,14 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
IFSET(SAMR_FIELD_NT_PASSWORD_PRESENT) {
status = samr_set_password_ex(dce_call,
- a_state->sam_ctx,
+ sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
&r->in.info->info25.password);
} else IFSET(SAMR_FIELD_LM_PASSWORD_PRESENT) {
status = samr_set_password_ex(dce_call,
- a_state->sam_ctx,
+ sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
@@ -4044,7 +4044,7 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
/* the set password levels are handled separately */
case 26:
status = samr_set_password_ex(dce_call,
- a_state->sam_ctx,
+ sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
@@ -4081,11 +4081,11 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
/* modify the samdb record */
if (msg->num_elements > 0) {
- ret = ldb_modify(a_state->sam_ctx, msg);
+ ret = ldb_modify(sam_ctx, msg);
if (ret != LDB_SUCCESS) {
DEBUG(1,("Failed to modify record %s: %s\n",
ldb_dn_get_linearized(a_state->account_dn),
- ldb_errstring(a_state->sam_ctx)));
+ ldb_errstring(sam_ctx)));
status = dsdb_ldb_err_to_ntstatus(ret);
goto done;