diff options
author | Günther Deschner <gd@samba.org> | 2010-03-23 15:19:25 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-03-29 15:35:45 +0200 |
commit | 1184ef6672347e6e446a485b992249f051a3873c (patch) | |
tree | c9bdc39a56e74491d56df30121d95f1a8eab42f0 /source4/torture/ntp | |
parent | 0590e7ef3685d629057971cf132838bf7e223ee3 (diff) | |
download | samba-1184ef6672347e6e446a485b992249f051a3873c.tar.gz samba-1184ef6672347e6e446a485b992249f051a3873c.tar.bz2 samba-1184ef6672347e6e446a485b992249f051a3873c.zip |
s4:torture/ntp: add explicit check for NTSTATUS r.out.result
Guenther
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/torture/ntp')
-rw-r--r-- | source4/torture/ntp/ntp_signd.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source4/torture/ntp/ntp_signd.c b/source4/torture/ntp/ntp_signd.c index 1d8d7e88e5..49b95e2d4f 100644 --- a/source4/torture/ntp/ntp_signd.c +++ b/source4/torture/ntp/ntp_signd.c @@ -78,8 +78,6 @@ static bool test_ntp_signd(struct torture_context *tctx, char *unix_address; int sys_errno; - NTSTATUS status; - struct MD5Context ctx; uint8_t sig[16]; enum ndr_err_code ndr_err; @@ -97,8 +95,11 @@ static bool test_ntp_signd(struct torture_context *tctx, generate_random_buffer(credentials1.data, sizeof(credentials1.data)); - status = dcerpc_netr_ServerReqChallenge_r(p->binding_handle, tctx, &r); - torture_assert_ntstatus_ok(tctx, status, "ServerReqChallenge"); + torture_assert_ntstatus_ok(tctx, + dcerpc_netr_ServerReqChallenge_r(p->binding_handle, tctx, &r), + "ServerReqChallenge failed"); + torture_assert_ntstatus_ok(tctx, r.out.result, + "ServerReqChallenge failed"); a.in.server_name = NULL; a.in.account_name = talloc_asprintf(tctx, "%s$", machine_name); @@ -120,8 +121,11 @@ static bool test_ntp_signd(struct torture_context *tctx, torture_comment(tctx, "Testing ServerAuthenticate3\n"); - status = dcerpc_netr_ServerAuthenticate3_r(p->binding_handle, tctx, &a); - torture_assert_ntstatus_ok(tctx, status, "ServerAuthenticate3"); + torture_assert_ntstatus_ok(tctx, + dcerpc_netr_ServerAuthenticate3_r(p->binding_handle, tctx, &a), + "ServerAuthenticate3 failed"); + torture_assert_ntstatus_ok(tctx, a.out.result, + "ServerAuthenticate3 failed"); torture_assert(tctx, netlogon_creds_client_check(creds, &credentials3), "Credential chaining failed"); |