summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-13 06:42:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:05 -0500
commit04b350acf8f060f9c654ce0e8d73d6edfa20a0fc (patch)
treea9c24f5e8a89f1acadad36ea4e44397cbbd0be1f /source4
parent8cd7848b8fc7f31bfcac84a44ae39deb40cf2587 (diff)
downloadsamba-04b350acf8f060f9c654ce0e8d73d6edfa20a0fc.tar.gz
samba-04b350acf8f060f9c654ce0e8d73d6edfa20a0fc.tar.bz2
samba-04b350acf8f060f9c654ce0e8d73d6edfa20a0fc.zip
r7521: Remove useless loops from SAMLOGON test, which speeds it up a lot.
Andrew Bartlett (This used to be commit d74b7c20b6e547dba039992f69cea31b46d92286)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/samlogon.c33
1 files changed, 17 insertions, 16 deletions
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;
- }
- }
}
}