From 159ca620946951b03431ef57623552abcea6b2f6 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 19 Mar 2010 00:21:01 +0100 Subject: s4:torture/rpc/unixinfo.c: add explicit check for NTSTATUS r.out.result Guenther Signed-off-by: Stefan Metzmacher --- source4/torture/rpc/unixinfo.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/unixinfo.c b/source4/torture/rpc/unixinfo.c index 607c1c0adb..8ccbd2b081 100644 --- a/source4/torture/rpc/unixinfo.c +++ b/source4/torture/rpc/unixinfo.c @@ -28,7 +28,6 @@ */ static bool test_sidtouid(struct torture_context *tctx, struct dcerpc_pipe *p) { - NTSTATUS status; struct unixinfo_SidToUid r; struct dom_sid *sid; uint64_t uid; @@ -38,9 +37,10 @@ static bool test_sidtouid(struct torture_context *tctx, struct dcerpc_pipe *p) r.in.sid = *sid; r.out.uid = &uid; - status = dcerpc_unixinfo_SidToUid_r(b, tctx, &r); - if (NT_STATUS_EQUAL(NT_STATUS_NONE_MAPPED, status)) { - } else torture_assert_ntstatus_ok(tctx, status, "SidToUid failed"); + torture_assert_ntstatus_ok(tctx, dcerpc_unixinfo_SidToUid_r(b, tctx, &r), + "SidToUid failed"); + if (NT_STATUS_EQUAL(NT_STATUS_NONE_MAPPED, r.out.result)) { + } else torture_assert_ntstatus_ok(tctx, r.out.result, "SidToUid failed"); return true; } @@ -59,7 +59,7 @@ static bool test_uidtosid(struct torture_context *tctx, struct dcerpc_pipe *p) torture_assert_ntstatus_ok(tctx, dcerpc_unixinfo_UidToSid_r(b, tctx, &r), "UidToSid failed"); - + torture_assert_ntstatus_ok(tctx, r.out.result, "UidToSid failed"); return true; } @@ -70,7 +70,6 @@ static bool test_getpwuid(struct torture_context *tctx, uint32_t num_uids = ARRAY_SIZE(uids); uint32_t i; struct unixinfo_GetPWUid r; - NTSTATUS result; struct dcerpc_binding_handle *b = p->binding_handle; for (i=0; i