diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-03-11 12:55:46 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-03-16 15:35:26 +0100 |
commit | 4434b3972d4971b17b4e45fc51d6f91536ed1b66 (patch) | |
tree | a4744734f884584c7e330bd113f5930e897ca212 | |
parent | 369def8a33eebb41a7d6cc2d1c10794ba3c49c32 (diff) | |
download | samba-4434b3972d4971b17b4e45fc51d6f91536ed1b66.tar.gz samba-4434b3972d4971b17b4e45fc51d6f91536ed1b66.tar.bz2 samba-4434b3972d4971b17b4e45fc51d6f91536ed1b66.zip |
s4:torture/rpc/dssync.c: make use of dcerpc_binding_handle stubs
metze
-rw-r--r-- | source4/torture/rpc/dssync.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c index 406b76e5b1..337f5e322a 100644 --- a/source4/torture/rpc/dssync.c +++ b/source4/torture/rpc/dssync.c @@ -38,6 +38,7 @@ struct DsSyncBindInfo { 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; @@ -203,8 +204,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)) { @@ -344,7 +346,7 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx) r.out.level_out = &level_out; r.out.ctr = &ctr; - status = dcerpc_drsuapi_DsCrackNames(ctx->admin.drsuapi.drs_pipe, ctx, &r); + status = dcerpc_drsuapi_DsCrackNames_r(ctx->admin.drsuapi.drs_handle, ctx, &r); if (!NT_STATUS_IS_OK(status)) { const char *errstr = nt_errstr(status); if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) { @@ -907,7 +909,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx) r.in.req->req8.highwatermark.highest_usn); } - status = dcerpc_drsuapi_DsGetNCChanges(ctx->new_dc.drsuapi.drs_pipe, ctx, &r); + status = dcerpc_drsuapi_DsGetNCChanges_r(ctx->new_dc.drsuapi.drs_handle, ctx, &r); torture_drsuapi_assert_call(tctx, ctx->new_dc.drsuapi.drs_pipe, status, &r, "dcerpc_drsuapi_DsGetNCChanges"); @@ -1016,7 +1018,7 @@ static bool test_FetchNT4Data(struct torture_context *tctx, r.in.req = &req; - status = dcerpc_drsuapi_DsGetNT4ChangeLog(ctx->new_dc.drsuapi.drs_pipe, ctx, &r); + status = dcerpc_drsuapi_DsGetNT4ChangeLog_r(ctx->new_dc.drsuapi.drs_handle, ctx, &r); if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) { torture_skip(tctx, "DsGetNT4ChangeLog not supported by target server"); } else if (!NT_STATUS_IS_OK(status)) { @@ -1100,11 +1102,11 @@ static bool torture_dssync_tcase_teardown(struct torture_context *tctx, void *da /* 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); /* Unbing new_dc handle */ r.in.bind_handle = &ctx->new_dc.drsuapi.bind_handle; - dcerpc_drsuapi_DsUnbind(ctx->new_dc.drsuapi.drs_pipe, ctx, &r); + dcerpc_drsuapi_DsUnbind_r(ctx->new_dc.drsuapi.drs_handle, ctx, &r); talloc_free(ctx); |