|
|
b6b438 |
From 067a5405a729c6d3b91a30ab0f16c0fa10db0498 Mon Sep 17 00:00:00 2001
|
|
|
b6b438 |
From: Andreas Schneider <asn@samba.org>
|
|
|
b6b438 |
Date: Mon, 4 Nov 2019 17:26:48 +0100
|
|
|
b6b438 |
Subject: [PATCH 193/208] s3:utils: Add weak crypto information to testparm
|
|
|
b6b438 |
|
|
|
b6b438 |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
b6b438 |
---
|
|
|
b6b438 |
source3/utils/testparm.c | 9 +++++++++
|
|
|
b6b438 |
source3/utils/wscript_build | 1 +
|
|
|
b6b438 |
2 files changed, 10 insertions(+)
|
|
|
b6b438 |
|
|
|
b6b438 |
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
|
|
|
b6b438 |
index f4e94b6ef74..c5001e01679 100644
|
|
|
b6b438 |
--- a/source3/utils/testparm.c
|
|
|
b6b438 |
+++ b/source3/utils/testparm.c
|
|
|
b6b438 |
@@ -35,6 +35,7 @@
|
|
|
b6b438 |
#include "system/filesys.h"
|
|
|
b6b438 |
#include "popt_common.h"
|
|
|
b6b438 |
#include "lib/param/loadparm.h"
|
|
|
b6b438 |
+#include "lib/crypto/gnutls_helpers.h"
|
|
|
b6b438 |
#include "cmdline_contexts.h"
|
|
|
b6b438 |
|
|
|
b6b438 |
#include <regex.h>
|
|
|
b6b438 |
@@ -647,6 +648,7 @@ static void do_per_share_checks(int s)
|
|
|
b6b438 |
const char *caddr;
|
|
|
b6b438 |
static int show_defaults;
|
|
|
b6b438 |
static int skip_logic_checks = 0;
|
|
|
b6b438 |
+ const char *weak_crypo_str = "";
|
|
|
b6b438 |
|
|
|
b6b438 |
struct poptOption long_options[] = {
|
|
|
b6b438 |
POPT_AUTOHELP
|
|
|
b6b438 |
@@ -752,6 +754,13 @@ static void do_per_share_checks(int s)
|
|
|
b6b438 |
|
|
|
b6b438 |
fprintf(stderr,"Loaded services file OK.\n");
|
|
|
b6b438 |
|
|
|
b6b438 |
+ if (samba_gnutls_weak_crypto_allowed()) {
|
|
|
b6b438 |
+ weak_crypo_str = "allowed";
|
|
|
b6b438 |
+ } else {
|
|
|
b6b438 |
+ weak_crypo_str = "disallowed";
|
|
|
b6b438 |
+ }
|
|
|
b6b438 |
+ fprintf(stderr, "Weak crypto is %s\n", weak_crypo_str);
|
|
|
b6b438 |
+
|
|
|
b6b438 |
if (skip_logic_checks == 0) {
|
|
|
b6b438 |
ret = do_global_checks();
|
|
|
b6b438 |
}
|
|
|
b6b438 |
diff --git a/source3/utils/wscript_build b/source3/utils/wscript_build
|
|
|
b6b438 |
index 9d9aa56bf37..618cc955647 100644
|
|
|
b6b438 |
--- a/source3/utils/wscript_build
|
|
|
b6b438 |
+++ b/source3/utils/wscript_build
|
|
|
b6b438 |
@@ -175,6 +175,7 @@ bld.SAMBA3_BINARY('testparm',
|
|
|
b6b438 |
smbconf
|
|
|
b6b438 |
popt_samba3
|
|
|
b6b438 |
cmdline_contexts
|
|
|
b6b438 |
+ GNUTLS_HELPERS
|
|
|
b6b438 |
''')
|
|
|
b6b438 |
|
|
|
b6b438 |
bld.SAMBA3_BINARY('net',
|
|
|
b6b438 |
--
|
|
|
b6b438 |
2.23.0
|
|
|
b6b438 |
|