1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s4-torture: add torture_rpc_connection_with_binding()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Günther Deschner 2016-10-27 14:12:35 +02:00 committed by Jeremy Allison
parent 8f4e426f33
commit b53b3b8e32
2 changed files with 21 additions and 4 deletions

View File

@ -75,16 +75,29 @@ _PUBLIC_ NTSTATUS torture_rpc_connection(struct torture_context *tctx,
NTSTATUS status;
struct dcerpc_binding *binding;
dcerpc_init();
status = torture_rpc_binding(tctx, &binding);
if (NT_STATUS_IS_ERR(status))
return status;
status = dcerpc_pipe_connect_b(tctx,
return torture_rpc_connection_with_binding(tctx, binding, p, table);
}
/**
* open a rpc connection to the chosen binding string
*/
_PUBLIC_ NTSTATUS torture_rpc_connection_with_binding(struct torture_context *tctx,
struct dcerpc_binding *binding,
struct dcerpc_pipe **p,
const struct ndr_interface_table *table)
{
NTSTATUS status;
dcerpc_init();
status = dcerpc_pipe_connect_b(tctx,
p, binding, table,
cmdline_credentials, tctx->ev, tctx->lp_ctx);
if (NT_STATUS_IS_ERR(status)) {
torture_warning(tctx, "Failed to connect to remote server: %s %s\n",
dcerpc_binding_string(tctx, binding), nt_errstr(status));

View File

@ -45,6 +45,10 @@ struct torture_rpc_tcase_data {
NTSTATUS torture_rpc_connection(struct torture_context *tctx,
struct dcerpc_pipe **p,
const struct ndr_interface_table *table);
NTSTATUS torture_rpc_connection_with_binding(struct torture_context *tctx,
struct dcerpc_binding *binding,
struct dcerpc_pipe **p,
const struct ndr_interface_table *table);
struct test_join *torture_join_domain(struct torture_context *tctx,
const char *machine_name,