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