summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-19 14:48:36 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-29 15:35:47 +0200
commit940c6ab29f21862ba21d313223ce73c6e3ea6401 (patch)
tree80c71b429823365bf52dfb10df8a88b16f932d18 /source4/torture
parenta154bb56297c7bdfe7d7505afc409e0333100770 (diff)
downloadsamba-940c6ab29f21862ba21d313223ce73c6e3ea6401.tar.gz
samba-940c6ab29f21862ba21d313223ce73c6e3ea6401.tar.bz2
samba-940c6ab29f21862ba21d313223ce73c6e3ea6401.zip
s4:torture/rpc/remote_pac.c: add explicit check for NTSTATUS r.out.result
Guenther Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/remote_pac.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/source4/torture/rpc/remote_pac.c b/source4/torture/rpc/remote_pac.c
index cfff5d1ead..81d2413239 100644
--- a/source4/torture/rpc/remote_pac.c
+++ b/source4/torture/rpc/remote_pac.c
@@ -175,9 +175,10 @@ static bool test_PACVerify(struct torture_context *tctx,
r.out.authoritative = &authoritative;
r.out.return_authenticator = &return_authenticator;
- status = dcerpc_netr_LogonSamLogon_r(b, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, dcerpc_netr_LogonSamLogon_r(b, tctx, &r),
+ "LogonSamLogon failed");
- torture_assert_ntstatus_ok(tctx, status, "LogonSamLogon failed");
+ torture_assert_ntstatus_ok(tctx, r.out.result, "LogonSamLogon failed");
/* This will break the signature nicely (even in the crypto wrapping), check we get a logon failure */
generic.data[generic.length-1]++;
@@ -194,9 +195,10 @@ static bool test_PACVerify(struct torture_context *tctx,
r.in.computer_name = cli_credentials_get_workstation(credentials);
r.in.validation_level = NetlogonValidationGenericInfo2;
- status = dcerpc_netr_LogonSamLogon_r(b, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, dcerpc_netr_LogonSamLogon_r(b, tctx, &r),
+ "LogonSamLogon failed");
- torture_assert_ntstatus_equal(tctx, status, NT_STATUS_LOGON_FAILURE, "LogonSamLogon failed");
+ torture_assert_ntstatus_equal(tctx, r.out.result, NT_STATUS_LOGON_FAILURE, "LogonSamLogon failed");
torture_assert(tctx, netlogon_creds_client_check(creds, &r.out.return_authenticator->cred),
"Credential chaining failed");
@@ -216,9 +218,10 @@ static bool test_PACVerify(struct torture_context *tctx,
r.in.computer_name = cli_credentials_get_workstation(credentials);
r.in.validation_level = NetlogonValidationGenericInfo2;
- status = dcerpc_netr_LogonSamLogon_r(b, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, dcerpc_netr_LogonSamLogon_r(b, tctx, &r),
+ "LogonSamLogon failed");
- torture_assert_ntstatus_equal(tctx, status, NT_STATUS_INVALID_PARAMETER, "LogonSamLogon failed");
+ torture_assert_ntstatus_equal(tctx, r.out.result, NT_STATUS_INVALID_PARAMETER, "LogonSamLogon failed");
torture_assert(tctx, netlogon_creds_client_check(creds,
&r.out.return_authenticator->cred),
@@ -264,9 +267,10 @@ static bool test_PACVerify(struct torture_context *tctx,
r.in.computer_name = cli_credentials_get_workstation(credentials);
r.in.validation_level = NetlogonValidationGenericInfo2;
- status = dcerpc_netr_LogonSamLogon_r(b, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, dcerpc_netr_LogonSamLogon_r(b, tctx, &r),
+ "LogonSamLogon failed");
- torture_assert_ntstatus_equal(tctx, status, NT_STATUS_LOGON_FAILURE, "LogonSamLogon failed");
+ torture_assert_ntstatus_equal(tctx, r.out.result, NT_STATUS_LOGON_FAILURE, "LogonSamLogon failed");
torture_assert(tctx, netlogon_creds_client_check(creds, &r.out.return_authenticator->cred),
"Credential chaining failed");
@@ -311,9 +315,10 @@ static bool test_PACVerify(struct torture_context *tctx,
r.in.computer_name = cli_credentials_get_workstation(credentials);
r.in.validation_level = NetlogonValidationGenericInfo2;
- status = dcerpc_netr_LogonSamLogon_r(b, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, dcerpc_netr_LogonSamLogon_r(b, tctx, &r),
+ "LogonSamLogon failed");
- torture_assert_ntstatus_equal(tctx, status, NT_STATUS_INVALID_PARAMETER, "LogonSamLogon failed");
+ torture_assert_ntstatus_equal(tctx, r.out.result, NT_STATUS_INVALID_PARAMETER, "LogonSamLogon failed");
torture_assert(tctx, netlogon_creds_client_check(creds, &r.out.return_authenticator->cred),
"Credential chaining failed");