From 04b350acf8f060f9c654ce0e8d73d6edfa20a0fc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 13 Jun 2005 06:42:36 +0000 Subject: r7521: Remove useless loops from SAMLOGON test, which speeds it up a lot. Andrew Bartlett (This used to be commit d74b7c20b6e547dba039992f69cea31b46d92286) --- source4/torture/rpc/samlogon.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c index 104583058a..12b7ea92b1 100644 --- a/source4/torture/rpc/samlogon.c +++ b/source4/torture/rpc/samlogon.c @@ -1377,6 +1377,7 @@ BOOL torture_rpc_samlogon(void) goto failed; } + /* Try all the tests for different username forms */ for (ci = 0; ci < ARRAY_SIZE(usercreds); ci++) { if (!test_InteractiveLogon(p, mem_ctx, creds, @@ -1397,26 +1398,26 @@ BOOL torture_rpc_samlogon(void) } } + /* Using the first username form, try the different + * credentials flag setups, on only one of the tests (checks + * session key encryption) */ + for (i=0; i < ARRAY_SIZE(credential_flags); i++) { + if (!test_InteractiveLogon(p, mem_ctx, creds, + usercreds[0].domain, + usercreds[0].username, + usercreds[0].password)) { + ret = False; + } - for (ci = 0; ci < ARRAY_SIZE(usercreds); ci++) { - - if (!test_InteractiveLogon(p, mem_ctx, creds, - usercreds[ci].domain, - usercreds[ci].username, - usercreds[ci].password)) { + if (usercreds[ci].network_login) { + if (!test_SamLogon(p, mem_ctx, creds, + usercreds[0].domain, + usercreds[0].username, + usercreds[0].password, + 1)) { ret = False; } - - if (usercreds[ci].network_login) { - if (!test_SamLogon(p, mem_ctx, creds, - usercreds[ci].domain, - usercreds[ci].username, - usercreds[ci].password, - 1)) { - ret = False; - } - } } } -- cgit