diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-01-06 12:13:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:28 -0500 |
commit | 56df264cf8f935e5e4838ce2832779a6c88b5eb7 (patch) | |
tree | 2640baf8824b4b6f9930be22eac887e01ab13860 /source4/torture/rpc | |
parent | 07731930577152b1e8bcec59fd5ee6be443f0c02 (diff) | |
download | samba-56df264cf8f935e5e4838ce2832779a6c88b5eb7.tar.gz samba-56df264cf8f935e5e4838ce2832779a6c88b5eb7.tar.bz2 samba-56df264cf8f935e5e4838ce2832779a6c88b5eb7.zip |
r4566: Fix Samba4 to pass it's own RPC-SAMLOGON torture test.
Include RPC-SAMLOGON in the list of tests expected to pass
Remove silly extra loops from the RPC-SAMLOGON test, which mostly just
slowed htings down.
Andrew Bartlett
(This used to be commit 518ca9fb695b0f9d480122a74a2159f7f17a3219)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/samlogon.c | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c index 0c5afd44fe..7e5579b213 100644 --- a/source4/torture/rpc/samlogon.c +++ b/source4/torture/rpc/samlogon.c @@ -582,7 +582,7 @@ static BOOL test_lmv2_ntlmv2_broken(struct samlogon_state *samlogon_state, enum switch (break_which) { case NO_NT: - if (memcmp(lmv2_session_key.data, user_session_key, + if (memcmp(lmv2_session_key.data, user_session_key, sizeof(user_session_key)) != 0) { printf("USER (LMv2) Session Key does not match expectations!\n"); printf("user_session_key:\n"); @@ -604,21 +604,42 @@ static BOOL test_lmv2_ntlmv2_broken(struct samlogon_state *samlogon_state, enum default: if (memcmp(ntlmv2_session_key.data, user_session_key, sizeof(user_session_key)) != 0) { - printf("USER (NTLMv2) Session Key does not match expectations!\n"); - printf("user_session_key:\n"); - dump_data(1, user_session_key, 16); - printf("expected:\n"); - dump_data(1, ntlmv2_session_key.data, ntlmv2_session_key.length); - pass = False; + if (memcmp(lmv2_session_key.data, user_session_key, + sizeof(user_session_key)) == 0) { + printf("USER (NTLMv2) Session Key expected, got LMv2 sessesion key instead:\n"); + printf("user_session_key:\n"); + dump_data(1, user_session_key, 16); + printf("expected:\n"); + dump_data(1, ntlmv2_session_key.data, ntlmv2_session_key.length); + pass = False; + + } else { + printf("USER (NTLMv2) Session Key does not match expectations!\n"); + printf("user_session_key:\n"); + dump_data(1, user_session_key, 16); + printf("expected:\n"); + dump_data(1, ntlmv2_session_key.data, ntlmv2_session_key.length); + pass = False; + } } if (memcmp(ntlmv2_session_key.data, lm_session_key, sizeof(lm_session_key)) != 0) { - printf("LM (NTLMv2) Session Key does not match expectations!\n"); - printf("lm_session_key:\n"); - dump_data(1, lm_session_key, 8); - printf("expected:\n"); - dump_data(1, ntlmv2_session_key.data, 8); - pass = False; + if (memcmp(lmv2_session_key.data, lm_session_key, + sizeof(lm_session_key)) == 0) { + printf("LM (NTLMv2) Session Key expected, got LMv2 sessesion key instead:\n"); + printf("user_session_key:\n"); + dump_data(1, lm_session_key, 8); + printf("expected:\n"); + dump_data(1, ntlmv2_session_key.data, 8); + pass = False; + } else { + printf("LM (NTLMv2) Session Key does not match expectations!\n"); + printf("lm_session_key:\n"); + dump_data(1, lm_session_key, 8); + printf("expected:\n"); + dump_data(1, ntlmv2_session_key.data, 8); + pass = False; + } } } @@ -1267,21 +1288,6 @@ BOOL torture_rpc_samlogon(void) } } - for (i=0; i < 32; i++) { - if (!test_SetupCredentials2(p, mem_ctx, 1 << i, - TEST_MACHINE_NAME, machine_password, creds)) { - return False; - } - - if (!test_InteractiveLogon(p, mem_ctx, creds)) { - ret = False; - } - - if (!test_SamLogon(p, mem_ctx, creds)) { - ret = False; - } - } - failed: talloc_destroy(mem_ctx); |