ask the server what interface IDs are available on this endpoint
*/
bool test_inq_if_ids(struct torture_context *tctx,
- struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+ struct dcerpc_binding_handle *b,
+ TALLOC_CTX *mem_ctx,
bool (*per_id_test)(struct torture_context *,
const struct ndr_interface_table *iface,
TALLOC_CTX *mem_ctx,
vector = talloc(mem_ctx, struct rpc_if_id_vector_t);
r.out.if_id_vector = &vector;
- status = dcerpc_mgmt_inq_if_ids(p, mem_ctx, &r);
+ status = dcerpc_mgmt_inq_if_ids_r(b, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
printf("inq_if_ids failed - %s\n", nt_errstr(status));
return false;
return true;
}
-static bool test_inq_stats(struct dcerpc_pipe *p,
+static bool test_inq_stats(struct dcerpc_binding_handle *b,
TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
r.in.unknown = 0;
r.out.statistics = &statistics;
- status = dcerpc_mgmt_inq_stats(p, mem_ctx, &r);
+ status = dcerpc_mgmt_inq_stats_r(b, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
printf("inq_stats failed - %s\n", nt_errstr(status));
return false;
return true;
}
-static bool test_inq_princ_name(struct dcerpc_pipe *p,
+static bool test_inq_princ_name(struct dcerpc_binding_handle *b,
TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
r.in.authn_proto = i; /* DCERPC_AUTH_TYPE_* */
r.in.princ_name_size = 100;
- status = dcerpc_mgmt_inq_princ_name(p, mem_ctx, &r);
+ status = dcerpc_mgmt_inq_princ_name_r(b, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
continue;
}
return true;
}
-static bool test_is_server_listening(struct dcerpc_pipe *p,
+static bool test_is_server_listening(struct dcerpc_binding_handle *b,
TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
struct mgmt_is_server_listening r;
r.out.status = talloc(mem_ctx, uint32_t);
- status = dcerpc_mgmt_is_server_listening(p, mem_ctx, &r);
+ status = dcerpc_mgmt_is_server_listening_r(b, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
printf("is_server_listening failed - %s\n", nt_errstr(status));
return false;
return true;
}
-static bool test_stop_server_listening(struct dcerpc_pipe *p,
+static bool test_stop_server_listening(struct dcerpc_binding_handle *b,
TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
struct mgmt_stop_server_listening r;
- status = dcerpc_mgmt_stop_server_listening(p, mem_ctx, &r);
+ status = dcerpc_mgmt_stop_server_listening_r(b, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
printf("stop_server_listening failed - %s\n", nt_errstr(status));
return false;
}
for (l=ndr_table_list();l;l=l->next) {
+ struct dcerpc_binding_handle *bh;
+
loop_ctx = talloc_named(mem_ctx, 0, "torture_rpc_mgmt loop context");
/* some interfaces are not mappable */
talloc_free(loop_ctx);
continue;
}
+ bh = p->binding_handle;
if (!NT_STATUS_IS_OK(status)) {
talloc_free(loop_ctx);
continue;
}
- if (!test_is_server_listening(p, loop_ctx)) {
+ if (!test_is_server_listening(bh, loop_ctx)) {
ret = false;
}
- if (!test_stop_server_listening(p, loop_ctx)) {
+ if (!test_stop_server_listening(bh, loop_ctx)) {
ret = false;
}
- if (!test_inq_stats(p, loop_ctx)) {
+ if (!test_inq_stats(bh, loop_ctx)) {
ret = false;
}
- if (!test_inq_princ_name(p, loop_ctx)) {
+ if (!test_inq_princ_name(bh, loop_ctx)) {
ret = false;
}
- if (!test_inq_if_ids(torture, p, loop_ctx, NULL, NULL)) {
+ if (!test_inq_if_ids(torture, bh, loop_ctx, NULL, NULL)) {
ret = false;
}