static bool test_LookupNames2(struct dcerpc_pipe *p,
struct torture_context *tctx,
struct policy_handle *handle,
- struct lsa_TransNameArray2 *tnames)
+ struct lsa_TransNameArray2 *tnames,
+ bool check_result)
{
struct lsa_LookupNames2 r;
struct lsa_TransSidArray2 sids;
return false;
}
+ if (check_result) {
+ torture_assert_int_equal(tctx, count, sids.count,
+ "unexpected number of results returned");
+ if (sids.count > 0) {
+ torture_assert(tctx, sids.sids, "invalid sid buffer");
+ }
+ }
+
printf("\n");
return true;
static bool test_LookupNames3(struct dcerpc_pipe *p,
struct torture_context *tctx,
struct policy_handle *handle,
- struct lsa_TransNameArray2 *tnames)
+ struct lsa_TransNameArray2 *tnames,
+ bool check_result)
{
struct lsa_LookupNames3 r;
struct lsa_TransSidArray3 sids;
return false;
}
+ if (check_result) {
+ torture_assert_int_equal(tctx, count, sids.count,
+ "unexpected number of results returned");
+ if (sids.count > 0) {
+ torture_assert(tctx, sids.sids, "invalid sid buffer");
+ }
+ }
+
printf("\n");
return true;
static bool test_LookupNames4(struct dcerpc_pipe *p,
struct torture_context *tctx,
- struct lsa_TransNameArray2 *tnames)
+ struct lsa_TransNameArray2 *tnames,
+ bool check_result)
{
struct lsa_LookupNames4 r;
struct lsa_TransSidArray3 sids;
return false;
}
+ if (check_result) {
+ torture_assert_int_equal(tctx, count, sids.count,
+ "unexpected number of results returned");
+ if (sids.count > 0) {
+ torture_assert(tctx, sids.sids, "invalid sid buffer");
+ }
+ }
+
printf("\n");
return true;
printf("\n");
- if (!test_LookupNames2(p, tctx, handle, &names)) {
+ if (!test_LookupNames2(p, tctx, handle, &names, false)) {
return false;
}
- if (!test_LookupNames3(p, tctx, handle, &names)) {
+ if (!test_LookupNames3(p, tctx, handle, &names, false)) {
return false;
}
printf("\n");
- if (!test_LookupNames4(p, tctx, &names)) {
+ if (!test_LookupNames4(p, tctx, &names, false)) {
return false;
}
nt_errstr(status));
return false;
}
- if (!test_LookupNames4(p, tctx, &names)) {
+ if (!test_LookupNames4(p, tctx, &names, false)) {
return false;
}
}