From 1184ef6672347e6e446a485b992249f051a3873c Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Tue, 23 Mar 2010 15:19:25 +0100 Subject: [PATCH] s4:torture/ntp: add explicit check for NTSTATUS r.out.result Guenther Signed-off-by: Stefan Metzmacher --- source4/torture/ntp/ntp_signd.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source4/torture/ntp/ntp_signd.c b/source4/torture/ntp/ntp_signd.c index 1d8d7e88e5f..49b95e2d4fb 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"); -- 2.34.1