diff options
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 30856c6ce9..4d68212073 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -1946,7 +1946,7 @@ static NTSTATUS samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call, struct samr_CryptPassword *pwbuf = r->in.password; void *sam_ctx; const char *user_dn, *domain_dn; - int ret; + int ret, i; struct ldb_message **res, mod; const char * const attrs[] = { "objectSid", "lmPwdHash", NULL }; const char *domain_sid; @@ -2027,6 +2027,11 @@ static NTSTATUS samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call, return status; } + /* mark all the message elements as LDB_FLAG_MOD_REPLACE */ + for (i=0;i<mod.num_elements;i++) { + mod.elements[i].flags = LDB_FLAG_MOD_REPLACE; + } + /* modify the samdb record */ ret = samdb_modify(sam_ctx, mem_ctx, &mod); if (ret != 0) { |