summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorIsaac Boukris <iboukris@gmail.com>2019-11-08 15:40:01 +0100
committerAndrew Bartlett <abartlet@samba.org>2019-12-10 00:30:30 +0000
commita5548af018643f2e78c482e33ef0e6073db149e4 (patch)
tree324edb9765f2874367e3c9a706504ebaa7653546 /source3/rpc_client
parent2eef12904f2c08257394a2ee869960f7c2e09112 (diff)
downloadsamba-a5548af018643f2e78c482e33ef0e6073db149e4.tar.gz
smbdes: convert E_P24() and SMBOWFencrypt to use gnutls
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_netlogon.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index ea9cb757048..175f83d6750 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -37,6 +37,7 @@
#include "dbwrap/dbwrap.h"
#include "dbwrap/dbwrap_open.h"
#include "util_tdb.h"
+#include "lib/crypto/gnutls_helpers.h"
NTSTATUS rpccli_pre_open_netlogon_creds(void)
@@ -528,6 +529,7 @@ NTSTATUS rpccli_netlogon_password_logon(
case NetlogonNetworkTransitiveInformation: {
struct netr_NetworkInfo *network_info;
uint8_t chal[8];
+ int rc;
ZERO_STRUCT(lm);
ZERO_STRUCT(nt);
@@ -541,7 +543,11 @@ NTSTATUS rpccli_netlogon_password_logon(
generate_random_buffer(chal, 8);
SMBencrypt(password, chal, local_lm_response);
- SMBNTencrypt(password, chal, local_nt_response);
+ rc = SMBNTencrypt(password, chal, local_nt_response);
+ if (rc != 0) {
+ TALLOC_FREE(frame);
+ return gnutls_error_to_ntstatus(rc, NT_STATUS_ACCESS_DISABLED_BY_POLICY_OTHER);
+ }
lm.length = 24;
lm.data = local_lm_response;