Blame SOURCES/0120-libcli-smb-Use-gnutls_error_to_ntstatus-in-smb2_sign.patch
|
|
b6b438 |
From a7169122940d8eb3e37320dc1dca4c99e0c6f37a Mon Sep 17 00:00:00 2001
|
|
|
b6b438 |
From: Andrew Bartlett <abartlet@samba.org>
|
|
|
b6b438 |
Date: Fri, 16 Aug 2019 15:47:49 +1200
|
|
|
b6b438 |
Subject: [PATCH 120/187] libcli/smb: Use gnutls_error_to_ntstatus() in
|
|
|
b6b438 |
smb2_signing_sign_pdu()
|
|
|
b6b438 |
|
|
|
b6b438 |
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
|
b6b438 |
Reviewed-by: Andreas Schneider <asn@samba.org>
|
|
|
b6b438 |
(cherry picked from commit 9d8ffc81a53b6b3d7c29f0da8fd71e696ca7e9d8)
|
|
|
b6b438 |
---
|
|
|
b6b438 |
libcli/smb/smb2_signing.c | 4 ++--
|
|
|
b6b438 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
b6b438 |
|
|
|
b6b438 |
diff --git a/libcli/smb/smb2_signing.c b/libcli/smb/smb2_signing.c
|
|
|
b6b438 |
index b7c0be528b7..466fe9a49e3 100644
|
|
|
b6b438 |
--- a/libcli/smb/smb2_signing.c
|
|
|
b6b438 |
+++ b/libcli/smb/smb2_signing.c
|
|
|
b6b438 |
@@ -114,7 +114,7 @@ NTSTATUS smb2_signing_sign_pdu(struct smb2_signing_key *signing_key,
|
|
|
b6b438 |
key.data,
|
|
|
b6b438 |
key.size);
|
|
|
b6b438 |
if (rc < 0) {
|
|
|
b6b438 |
- return NT_STATUS_NO_MEMORY;
|
|
|
b6b438 |
+ return gnutls_error_to_ntstatus(rc, NT_STATUS_HMAC_NOT_SUPPORTED);
|
|
|
b6b438 |
}
|
|
|
b6b438 |
}
|
|
|
b6b438 |
|
|
|
b6b438 |
@@ -123,7 +123,7 @@ NTSTATUS smb2_signing_sign_pdu(struct smb2_signing_key *signing_key,
|
|
|
b6b438 |
vector[i].iov_base,
|
|
|
b6b438 |
vector[i].iov_len);
|
|
|
b6b438 |
if (rc < 0) {
|
|
|
b6b438 |
- return NT_STATUS_INTERNAL_ERROR;
|
|
|
b6b438 |
+ return gnutls_error_to_ntstatus(rc, NT_STATUS_HMAC_NOT_SUPPORTED);
|
|
|
b6b438 |
}
|
|
|
b6b438 |
}
|
|
|
b6b438 |
gnutls_hmac_output(signing_key->hmac_hnd, res);
|
|
|
b6b438 |
--
|
|
|
b6b438 |
2.23.0
|
|
|
b6b438 |
|