From c0160d0614ad74be275d4008559a45da3d79d2e7 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 12 Jun 2010 15:47:14 +0200 Subject: s4:torture - SAMR password tests - activate support for password sets on level "18" and "21" --- source4/torture/rpc/samr.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index c514ed6188..8a8520c25f 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -4684,34 +4684,29 @@ static bool test_user_ops(struct dcerpc_pipe *p, ret = false; } - if (torture_setting_bool(tctx, "samba4", false)) { - torture_comment(tctx, "skipping Set Password level 18 and 21 against Samba4\n"); - } else { + if (!test_SetUserPass_18(p, tctx, user_handle, &password)) { + ret = false; + } - if (!test_SetUserPass_18(p, tctx, user_handle, &password)) { - ret = false; + if (!test_ChangePasswordUser3(p, tctx, base_acct_name, 0, &password, NULL, 0, false)) { + ret = false; + } + + for (i = 0; password_fields[i]; i++) { + + if (password_fields[i] == SAMR_FIELD_LM_PASSWORD_PRESENT) { + /* we need to skip as that would break + * the ChangePasswordUser3 verify */ + continue; } - if (!test_ChangePasswordUser3(p, tctx, base_acct_name, 0, &password, NULL, 0, false)) { + if (!test_SetUserPass_21(p, tctx, user_handle, password_fields[i], &password)) { ret = false; } - for (i = 0; password_fields[i]; i++) { - - if (password_fields[i] == SAMR_FIELD_LM_PASSWORD_PRESENT) { - /* we need to skip as that would break - * the ChangePasswordUser3 verify */ - continue; - } - - if (!test_SetUserPass_21(p, tctx, user_handle, password_fields[i], &password)) { - ret = false; - } - - /* check it was set right */ - if (!test_ChangePasswordUser3(p, tctx, base_acct_name, 0, &password, NULL, 0, false)) { - ret = false; - } + /* check it was set right */ + if (!test_ChangePasswordUser3(p, tctx, base_acct_name, 0, &password, NULL, 0, false)) { + ret = false; } } -- cgit