summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-11 13:03:26 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-16 15:35:27 +0100
commit88ab666f191ce36b13e6628ca39b34b0e09a4088 (patch)
treebd913cec88cc2e2d8e047d440a62283c96a68d92 /source4/torture/rpc
parent4434b3972d4971b17b4e45fc51d6f91536ed1b66 (diff)
downloadsamba-88ab666f191ce36b13e6628ca39b34b0e09a4088.tar.gz
samba-88ab666f191ce36b13e6628ca39b34b0e09a4088.tar.bz2
samba-88ab666f191ce36b13e6628ca39b34b0e09a4088.zip
s4:torture/rpc/dsgetinfo.c: make use of dcerpc_binding_handle stubs
metze
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/dsgetinfo.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/torture/rpc/dsgetinfo.c b/source4/torture/rpc/dsgetinfo.c
index 3c3e293d0d..7fdbdc470a 100644
--- a/source4/torture/rpc/dsgetinfo.c
+++ b/source4/torture/rpc/dsgetinfo.c
@@ -36,6 +36,7 @@
struct DsGetinfoBindInfo {
struct dcerpc_pipe *drs_pipe;
+ struct dcerpc_binding_handle *drs_handle;
struct drsuapi_DsBind req;
struct GUID bind_guid;
struct drsuapi_DsBindInfoCtr our_bind_info_ctr;
@@ -164,8 +165,9 @@ static bool _test_DsBind(struct torture_context *tctx,
printf("Failed to connect to server as a BDC: %s\n", nt_errstr(status));
return false;
}
+ b->drs_handle = b->drs_pipe->binding_handle;
- status = dcerpc_drsuapi_DsBind(b->drs_pipe, ctx, &b->req);
+ status = dcerpc_drsuapi_DsBind_r(b->drs_handle, ctx, &b->req);
if (!NT_STATUS_IS_OK(status)) {
const char *errstr = nt_errstr(status);
if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
@@ -217,6 +219,7 @@ static bool test_getinfo(struct torture_context *tctx,
{
NTSTATUS status;
struct dcerpc_pipe *p = ctx->admin.drsuapi.drs_pipe;
+ struct dcerpc_binding_handle *b = ctx->admin.drsuapi.drs_handle;
struct drsuapi_DsReplicaGetInfo r;
union drsuapi_DsReplicaGetInfoRequest req;
union drsuapi_DsReplicaInfo info;
@@ -341,7 +344,7 @@ static bool test_getinfo(struct torture_context *tctx,
r.out.info = &info;
r.out.info_type = &info_type;
- status = dcerpc_drsuapi_DsReplicaGetInfo(p, tctx, &r);
+ status = dcerpc_drsuapi_DsReplicaGetInfo_r(b, tctx, &r);
if (W_ERROR_EQUAL(r.out.result, WERR_INVALID_LEVEL)) {
/* this is a not yet supported level */
@@ -398,7 +401,7 @@ static bool torture_dsgetinfo_tcase_teardown(struct torture_context *tctx, void
/* Unbing admin handle */
r.in.bind_handle = &ctx->admin.drsuapi.bind_handle;
- dcerpc_drsuapi_DsUnbind(ctx->admin.drsuapi.drs_pipe, ctx, &r);
+ dcerpc_drsuapi_DsUnbind_r(ctx->admin.drsuapi.drs_handle, ctx, &r);
talloc_free(ctx);