From f29d31a7e0f7b397cbcbb83d1b1c0ce233e948e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Fri, 5 Dec 2008 16:11:15 +0100 Subject: [PATCH] s4-smbtorture: do full level 18, 21, 23, 24, 25, 26 testing in pwdlastset test. Guenther --- source4/torture/rpc/samr.c | 108 ++++++++++++------------------------- 1 file changed, 33 insertions(+), 75 deletions(-) diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index e92f1d01566..d29c864b926 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -2674,11 +2674,13 @@ static bool test_SetPassword_pwdlastset(struct dcerpc_pipe *p, struct policy_handle *handle, char **password) { - int i, s = 0, q = 0, f = 0; + int i, s = 0, q = 0, f = 0, l = 0, z = 0; bool ret = true; int delay = 500000; bool set_levels[] = { false, true }; bool query_levels[] = { false, true }; + uint32_t levels[] = { 18, 21, 23, 24, 25, 26 }; + uint32_t nonzeros[] = { 1, 24 }; uint32_t fields_present[] = { 0, SAMR_FIELD_EXPIRED_FLAG, @@ -2694,56 +2696,6 @@ static bool test_SetPassword_pwdlastset(struct dcerpc_pipe *p, SAMR_FIELD_NT_PASSWORD_PRESENT | SAMR_FIELD_LM_PASSWORD_PRESENT | SAMR_FIELD_LAST_PWD_CHANGE | SAMR_FIELD_EXPIRED_FLAG }; - struct { - uint16_t level; - uint8_t password_expired_nonzero; - } pwd_tests[] = { - - /* level 21 */ - { - .level = 21, - .password_expired_nonzero = 1, - },{ - .level = 21, - .password_expired_nonzero = 24, - - /* level 23 */ - },{ - .level = 23, - .password_expired_nonzero = 1, - },{ - .level = 23, - .password_expired_nonzero = 24, - },{ - - /* level 24 */ - - .level = 24, - .password_expired_nonzero = 1, - },{ - .level = 24, - .password_expired_nonzero = 24, - },{ - - /* level 25 */ - - .level = 25, - .password_expired_nonzero = 1, - },{ - .level = 25, - .password_expired_nonzero = 24 - },{ - - /* level 26 */ - - .level = 26, - .password_expired_nonzero = 1, - },{ - .level = 26, - .password_expired_nonzero = 24, - } - }; - if (torture_setting_bool(tctx, "samba3", false)) { delay = 1000000; printf("Samba3 has second granularity, setting delay to: %d\n", @@ -2757,7 +2709,8 @@ static bool test_SetPassword_pwdlastset(struct dcerpc_pipe *p, #define TEST_SET_LEVELS 1 #define TEST_QUERY_LEVELS 1 #endif - for (i=0; i