From: Noel Power Date: Fri, 21 Oct 2022 16:40:36 +0000 (+0100) Subject: s4/rpc_server/sambr: don't mutate the return of samdb_set_password_aes X-Git-Tag: talloc-2.4.0~667 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=416bf5a41827a4e486215bfc8e47abc570c6e899;p=thirdparty%2Fsamba.git s4/rpc_server/sambr: don't mutate the return of samdb_set_password_aes prior to this commit return of samdb_set_password_aes was set to NT_STATUS_WRONG_PASSWORD on failure. Useful status that should be returned such as NT_STATUS_PASSWORD_RESTRICTION are swallowed here otherwise (and in this case can be partially responsible for failures in test samba.tests.auth_log_pass_change (with later gnutls) Signed-off-by: Noel Power Reviewed-by: Andreas Schneider --- diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c index 4691f9a47a9..b581be6361c 100644 --- a/source4/rpc_server/samr/samr_password.c +++ b/source4/rpc_server/samr/samr_password.c @@ -250,7 +250,6 @@ NTSTATUS dcesrv_samr_ChangePasswordUser4(struct dcesrv_call_state *dce_call, if (!NT_STATUS_IS_OK(status)) { ldb_transaction_cancel(sam_ctx); - status = NT_STATUS_WRONG_PASSWORD; goto done; }