summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/rpc/unixinfo.c25
1 files changed, 13 insertions, 12 deletions
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<num_uids; i++) {
@@ -82,9 +81,10 @@ static bool test_getpwuid(struct torture_context *tctx,
r.out.count = &num_uids;
r.out.infos = talloc_array(tctx, struct unixinfo_GetPWUidInfo, num_uids);
- result = dcerpc_unixinfo_GetPWUid_r(b, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, dcerpc_unixinfo_GetPWUid_r(b, tctx, &r),
+ "GetPWUid failed");
- torture_assert_ntstatus_ok(tctx, result, "GetPWUid failed");
+ torture_assert_ntstatus_ok(tctx, r.out.result, "GetPWUid failed");
return true;
}
@@ -94,7 +94,6 @@ static bool test_getpwuid(struct torture_context *tctx,
*/
static bool test_sidtogid(struct torture_context *tctx, struct dcerpc_pipe *p)
{
- NTSTATUS status;
struct unixinfo_SidToGid r;
struct dom_sid *sid;
uint64_t gid;
@@ -104,9 +103,10 @@ static bool test_sidtogid(struct torture_context *tctx, struct dcerpc_pipe *p)
r.in.sid = *sid;
r.out.gid = &gid;
- status = dcerpc_unixinfo_SidToGid_r(b, tctx, &r);
- if (NT_STATUS_EQUAL(NT_STATUS_NONE_MAPPED, status)) {
- } else torture_assert_ntstatus_ok(tctx, status, "SidToGid failed");
+ torture_assert_ntstatus_ok(tctx, dcerpc_unixinfo_SidToGid_r(b, tctx, &r),
+ "SidToGid failed");
+ if (NT_STATUS_EQUAL(NT_STATUS_NONE_MAPPED, r.out.result)) {
+ } else torture_assert_ntstatus_ok(tctx, r.out.result, "SidToGid failed");
return true;
}
@@ -125,6 +125,7 @@ static bool test_gidtosid(struct torture_context *tctx, struct dcerpc_pipe *p)
torture_assert_ntstatus_ok(tctx, dcerpc_unixinfo_GidToSid_r(b, tctx, &r),
"GidToSid failed");
+ torture_assert_ntstatus_ok(tctx, r.out.result, "GidToSid failed");
return true;
}