samba/SOURCES/0095-s3-rpc_server-Check-NTSTATUS-return-value-from-netlo.patch
2021-09-10 04:12:26 +00:00

42 lines
1.4 KiB
Diff

From ca38586a27089b6bf8769b3701e8fc7ccd5f9215 Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet@samba.org>
Date: Fri, 16 Aug 2019 14:05:38 +1200
Subject: [PATCH 095/187] s3-rpc_server: Check NTSTATUS return value from
netlogon_creds_aes_decrypt()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 2f827bec8ca831fb486c8ebedc6b89b7f1cb99e2)
---
source3/rpc_server/netlogon/srv_netlog_nt.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
index 08bce367bf0..671300676ff 100644
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -1369,14 +1369,16 @@ NTSTATUS _netr_ServerPasswordSet2(struct pipes_struct *p,
SIVAL(password_buf.data, 512, r->in.new_password->length);
if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) {
- netlogon_creds_aes_decrypt(creds, password_buf.data, 516);
+ status = netlogon_creds_aes_decrypt(creds,
+ password_buf.data,
+ 516);
} else {
status = netlogon_creds_arcfour_crypt(creds,
password_buf.data,
516);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
+ }
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
}
if (!decode_pw_buffer(p->mem_ctx,
--
2.23.0