b6b438
From 88fed59d4c29b9ff7964db462ff56f1f92eedf3a Mon Sep 17 00:00:00 2001
b6b438
From: Andreas Schneider <asn@samba.org>
b6b438
Date: Wed, 20 Nov 2019 11:18:21 +0100
b6b438
Subject: [PATCH 208/208] s3:librpc: Only use RC4 if our systems supports it
b6b438
b6b438
Signed-off-by: Andreas Schneider <asn@samba.org>
b6b438
---
b6b438
 source4/librpc/rpc/dcerpc_schannel.c | 5 +++++
b6b438
 1 file changed, 5 insertions(+)
b6b438
b6b438
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
b6b438
index d12647222eb..8a82fdf60b5 100644
b6b438
--- a/source4/librpc/rpc/dcerpc_schannel.c
b6b438
+++ b/source4/librpc/rpc/dcerpc_schannel.c
b6b438
@@ -31,6 +31,7 @@
b6b438
 #include "auth/credentials/credentials.h"
b6b438
 #include "librpc/rpc/dcerpc_proto.h"
b6b438
 #include "param/param.h"
b6b438
+#include "lib/param/loadparm.h"
b6b438
 
b6b438
 struct schannel_key_state {
b6b438
 	struct dcerpc_pipe *pipe;
b6b438
@@ -341,6 +342,10 @@ static struct composite_context *dcerpc_schannel_key_send(TALLOC_CTX *mem_ctx,
b6b438
 		s->dcerpc_schannel_auto = true;
b6b438
 	}
b6b438
 
b6b438
+	if (lpcfg_weak_crypto(lp_ctx) == SAMBA_WEAK_CRYPTO_DISALLOWED) {
b6b438
+		s->local_negotiate_flags &= ~NETLOGON_NEG_ARCFOUR;
b6b438
+	}
b6b438
+
b6b438
 	/* type of authentication depends on schannel type */
b6b438
 	if (schannel_type == SEC_CHAN_RODC) {
b6b438
 		s->local_negotiate_flags |= NETLOGON_NEG_RODC_PASSTHROUGH;
b6b438
-- 
b6b438
2.23.0
b6b438