summaryrefslogtreecommitdiffstats
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-12-09 14:25:06 +1300
committerStefan Metzmacher <metze@samba.org>2014-04-02 17:12:48 +0200
commit3c731783e0e9ee4a7b4b9289544d4d8a465940b9 (patch)
treee24d5b2360cf7bfa0328bb7a49216e5bdae0929b /source4/torture
parente266f610dbd421107c8a06e3ee07354456b9f521 (diff)
downloadsamba-3c731783e0e9ee4a7b4b9289544d4d8a465940b9.tar.gz
samba-3c731783e0e9ee4a7b4b9289544d4d8a465940b9.tar.xz
samba-3c731783e0e9ee4a7b4b9289544d4d8a465940b9.zip
torture-samr: Improve rpc.samr.passwords.badpwdcount test
Change-Id: I89ac30d715e89f14aca049e0e5c5043a39ab93c7 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/samr.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 45a74cbb58f..551cd4539fd 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -3903,7 +3903,9 @@ static bool test_Password_badpwdcount(struct dcerpc_pipe *p,
if (!test_SamLogon_with_creds(tctx, np, machine_credentials,
acct_name, passwords[i],
expected_success_status, interactive)) {
- torture_fail(tctx, talloc_asprintf(tctx, "succeeded to authenticate with old password (#%d of #%d in history)", i, password_history_length));
+ torture_fail(tctx, talloc_asprintf(tctx, "did not successfully to obtain %s for %s login with old password (#%d of #%d in history)",
+ nt_errstr(expected_success_status),
+ interactive ? "interactive" : "network", i, password_history_length));
}
torture_assert(tctx,
@@ -4030,16 +4032,16 @@ static bool test_Password_badpwdcount_wrap(struct dcerpc_pipe *p,
continue;
}
- ret &= test_Password_badpwdcount(p, np, tctx, acct_flags, acct_name,
- domain_handle, user_handle, password,
- machine_credentials,
- creds[i].comment,
- creds[i].disabled,
- creds[i].interactive,
- creds[i].expected_success_status,
- &_info1, &_info12);
- if (!ret) {
+ if (!test_Password_badpwdcount(p, np, tctx, acct_flags, acct_name,
+ domain_handle, user_handle, password,
+ machine_credentials,
+ creds[i].comment,
+ creds[i].disabled,
+ creds[i].interactive,
+ creds[i].expected_success_status,
+ &_info1, &_info12)) {
torture_result(tctx, TORTURE_FAIL, "TEST #%d (%s) failed\n", i, creds[i].comment);
+ ret = false;
} else {
torture_comment(tctx, "TEST #%d (%s) succeeded\n", i, creds[i].comment);
}