summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-28 12:10:56 +0100
committerGünther Deschner <gd@samba.org>2008-11-28 14:09:26 +0100
commit4b687944f382185fafccc41f3ec4737a72e55448 (patch)
tree38ffb479309c4e0be4e10d155968ec25cc3d187a
parent465466e1afa70e0fa1076963ae67a96e9e5b4cbb (diff)
downloadsamba-4b687944f382185fafccc41f3ec4737a72e55448.tar.gz
samba-4b687944f382185fafccc41f3ec4737a72e55448.tar.bz2
samba-4b687944f382185fafccc41f3ec4737a72e55448.zip
s4-smbtorture: allow to disable full testing of all possible opcode combinations.
Guenther
-rw-r--r--source4/torture/rpc/samr.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 98e6a5a445..86a959df7c 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -2406,7 +2406,7 @@ static bool test_SetPassword_pwdlastset(struct dcerpc_pipe *p,
struct policy_handle *handle,
char **password)
{
- int i, s, q;
+ int i, s = 0, q = 0;
bool ret = true;
int delay = 500000;
bool set_levels[] = { false, true };
@@ -2530,10 +2530,20 @@ static bool test_SetPassword_pwdlastset(struct dcerpc_pipe *p,
return ret;
}
+ /* set to 1 to enable testing for all possible opcode
+ (SetUserInfo, SetUserInfo2, QueryUserInfo, QueryUserInfo2)
+ combinations */
+#if 0
+#define TEST_SET_LEVELS 1
+#define TEST_QUERY_LEVELS 1
+#endif
for (i=0; i<ARRAY_SIZE(pwd_tests); i++) {
+#ifdef TEST_SET_LEVELS
for (s=0; s<ARRAY_SIZE(set_levels); s++) {
+#endif
+#ifdef TEST_QUERY_LEVELS
for (q=0; q<ARRAY_SIZE(query_levels); q++) {
-
+#endif
NTTIME pwdlastset_old = 0;
NTTIME pwdlastset_new = 0;
@@ -2660,10 +2670,17 @@ static bool test_SetPassword_pwdlastset(struct dcerpc_pipe *p,
}
break;
}
+#ifdef TEST_QUERY_LEVELS
}
+#endif
+#ifdef TEST_SET_LEVELS
}
+#endif
}
+#undef TEST_SET_LEVELS
+#undef TEST_QUERY_LEVELS
+
return ret;
}