summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-25 11:21:46 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-25 12:09:32 +0200
commitabf27643616a0ad2c0477869c2146d852ee57026 (patch)
treebea85d775e50aeda7b73a7f2f9d674386faa0c9a /source4/torture/rpc
parentaf2cbaa700f8a56228131061ad10a1d219df1d83 (diff)
downloadsamba-abf27643616a0ad2c0477869c2146d852ee57026.tar.gz
samba-abf27643616a0ad2c0477869c2146d852ee57026.tar.bz2
samba-abf27643616a0ad2c0477869c2146d852ee57026.zip
s4:torture/rpc/samr.c: Fix the "ValidatePassword" test
It was failing randomly due to an uninitialised "status" variable.
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/samr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index c44c4eff8d..b87cac5ac9 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -7916,12 +7916,15 @@ static bool test_samr_ValidatePassword(struct dcerpc_pipe *p,
for (i=0; passwords[i]; i++) {
req.req3.password.string = passwords[i];
- torture_assert_ntstatus_ok(tctx, dcerpc_samr_ValidatePassword_r(b, tctx, &r),
- "ValidatePassword failed");
+
+ status = dcerpc_samr_ValidatePassword_r(b, tctx, &r);
if (NT_STATUS_EQUAL(status, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE)) {
torture_skip(tctx, "ValidatePassword not supported by server\n");
}
- torture_assert_ntstatus_ok(tctx, r.out.result, "samr_ValidatePassword");
+ torture_assert_ntstatus_ok(tctx, status,
+ "samr_ValidatePassword failed");
+ torture_assert_ntstatus_ok(tctx, r.out.result,
+ "samr_ValidatePassword failed");
torture_comment(tctx, "Server %s password '%s' with code %i\n",
repp->ctr3.status==SAMR_VALIDATION_STATUS_SUCCESS?"allowed":"refused",
req.req3.password.string, repp->ctr3.status);