summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2016-03-26 22:24:23 +0100
committerStefan Metzmacher <metze@samba.org>2016-04-12 19:25:24 +0200
commitf10589c0e1b60bde05fd14469db392019347b518 (patch)
tree3b88dec59f0ae850d71417058fbc7ee80ae93524 /source4/torture/basic
parentbbb066a12ad59604dafc739cc98ddb727aa969d5 (diff)
downloadsamba-f10589c0e1b60bde05fd14469db392019347b518.tar.gz
CVE-2016-2111: s4:torture/base: don't use ntlmv2 for dos connection in base.samba3error
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source4/torture/basic')
-rw-r--r--source4/torture/basic/base.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index e8ae4b6526b..081f4792843 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -1526,6 +1526,7 @@ static bool torture_chkpath_test(struct torture_context *tctx,
static bool torture_samba3_errorpaths(struct torture_context *tctx)
{
bool nt_status_support;
+ bool client_ntlmv2_auth;
struct smbcli_state *cli_nt = NULL, *cli_dos = NULL;
bool result = false;
int fnum;
@@ -1535,18 +1536,27 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
NTSTATUS status;
nt_status_support = lpcfg_nt_status_support(tctx->lp_ctx);
+ client_ntlmv2_auth = lpcfg_client_ntlmv2_auth(tctx->lp_ctx);
if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support", "yes")) {
torture_result(tctx, TORTURE_FAIL, "Could not set 'nt status support = yes'\n");
goto fail;
}
+ if (!lpcfg_set_cmdline(tctx->lp_ctx, "client ntlmv2 auth", "yes")) {
+ torture_result(tctx, TORTURE_FAIL, "Could not set 'client ntlmv2 auth = yes'\n");
+ goto fail;
+ }
if (!torture_open_connection(&cli_nt, tctx, 0)) {
goto fail;
}
if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support", "no")) {
- torture_result(tctx, TORTURE_FAIL, "Could not set 'nt status support = yes'\n");
+ torture_result(tctx, TORTURE_FAIL, "Could not set 'nt status support = no'\n");
+ goto fail;
+ }
+ if (!lpcfg_set_cmdline(tctx->lp_ctx, "client ntlmv2 auth", "no")) {
+ torture_result(tctx, TORTURE_FAIL, "Could not set 'client ntlmv2 auth = no'\n");
goto fail;
}
@@ -1556,7 +1566,12 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support",
nt_status_support ? "yes":"no")) {
- torture_result(tctx, TORTURE_FAIL, "Could not reset 'nt status support = yes'");
+ torture_result(tctx, TORTURE_FAIL, "Could not reset 'nt status support'");
+ goto fail;
+ }
+ if (!lpcfg_set_cmdline(tctx->lp_ctx, "client ntlmv2 auth",
+ client_ntlmv2_auth ? "yes":"no")) {
+ torture_result(tctx, TORTURE_FAIL, "Could not reset 'client ntlmv2 auth'");
goto fail;
}