summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-05-25 14:06:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:14 -0500
commit5b0ab386cb0fb74d78e6c68abe1b047ab515b7b3 (patch)
tree78f843cb6a9ff745f9ac5ef35de53bccbf1ccbd8 /source4/torture
parent579c13da43d5b40ac6d6c1436399fbc1d8dfd054 (diff)
downloadsamba-5b0ab386cb0fb74d78e6c68abe1b047ab515b7b3.tar.gz
samba-5b0ab386cb0fb74d78e6c68abe1b047ab515b7b3.tar.bz2
samba-5b0ab386cb0fb74d78e6c68abe1b047ab515b7b3.zip
r874: This patch is a pile of work on NTLMSSP:
Samba's NTLMSSP code is now fully talloc based, which should go a long way to cleaning up the memory leaks in this code. This also avoids a lot of extra copies of data, as we now allocate the 'return' blobs on a caller-supplied context. I have also been doing a lot of work towards NTLM2 signing and sealing. I have this working for sealing, but not for the verifier (MD5 integrity check on the stream) which is still incorrect. (I can aim a rpcecho sinkdata from a Win2k3 box to my server, and the data arrives intact, but the signature check fails. It does however match the test values I have...). The new torture test is cludged in - when we get a unit test suite back, I'll happliy put it in the 'right' place.... Andrew Bartlett (This used to be commit 399e2e2b1149b8d1c070aa7f0d5131c0b577d2b9)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/config.mk5
-rw-r--r--source4/torture/rpc/netlogon.c5
-rw-r--r--source4/torture/torture.c1
3 files changed, 7 insertions, 4 deletions
diff --git a/source4/torture/config.mk b/source4/torture/config.mk
index 05f4df2105..6231941715 100644
--- a/source4/torture/config.mk
+++ b/source4/torture/config.mk
@@ -9,7 +9,7 @@ ADD_OBJ_FILES = \
torture/basic/charset.o \
torture/basic/mangle_test.o \
torture/basic/denytest.o \
- torture/basic/aliases.o
+ torture/basic/aliases.o
REQUIRED_SUBSYSTEMS = \
LIBSMB
# End SUBSYSTEM TORTURE_BASIC
@@ -81,7 +81,8 @@ ADD_OBJ_FILES = \
[BINARY::smbtorture]
OBJ_FILES = \
torture/torture.o \
- torture/torture_util.o
+ torture/torture_util.o \
+ torture/ntlmssp.o
REQUIRED_SUBSYSTEMS = \
TORTURE_BASIC \
TORTURE_RAW \
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 25c0496a00..bd7a450f58 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -741,14 +741,15 @@ static BOOL test_lmv2_ntlmv2_broken(struct samlogon_state *samlogon_state, enum
DATA_BLOB ntlmv2_response = data_blob(NULL, 0);
DATA_BLOB lmv2_response = data_blob(NULL, 0);
DATA_BLOB ntlmv2_session_key = data_blob(NULL, 0);
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(lp_netbios_name(), lp_workgroup());
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, lp_netbios_name(), lp_workgroup());
uchar user_session_key[16];
ZERO_STRUCT(user_session_key);
/* TODO - test with various domain cases, and without domain */
- if (!SMBNTLMv2encrypt(samlogon_state->username, lp_workgroup(), samlogon_state->password, &samlogon_state->chall,
+ if (!SMBNTLMv2encrypt(samlogon_state->username, lp_workgroup(),
+ samlogon_state->password, &samlogon_state->chall,
&names_blob,
&lmv2_response, &ntlmv2_response,
&ntlmv2_session_key)) {
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 9ba90a103d..ef6a0c2ed8 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -4140,6 +4140,7 @@ static struct {
{"RPC-MGMT", torture_rpc_mgmt, 0},
{"RPC-SCANNER", torture_rpc_scanner, 0},
{"RPC-AUTOIDL", torture_rpc_autoidl, 0},
+ {"NTLMSSP-SELFCHECK", torture_ntlmssp_self_check, 0},
{NULL, NULL, 0}};