diff options
Diffstat (limited to 'source4/torture/rpc')
35 files changed, 61 insertions, 173 deletions
diff --git a/source4/torture/rpc/alter_context.c b/source4/torture/rpc/alter_context.c index 0b2c324d36a..a85a8504721 100644 --- a/source4/torture/rpc/alter_context.c +++ b/source4/torture/rpc/alter_context.c @@ -32,16 +32,14 @@ BOOL torture_rpc_alter_context(void) TALLOC_CTX *mem_ctx; BOOL ret = True; struct policy_handle *handle; + struct dcerpc_interface_table tmptbl; struct dcerpc_syntax_id syntax; struct dcerpc_syntax_id transfer_syntax; mem_ctx = talloc_init("torture_rpc_alter_context"); printf("opening LSA connection\n"); - status = torture_rpc_connection(mem_ctx, &p, - DCERPC_LSARPC_NAME, - DCERPC_LSARPC_UUID, - DCERPC_LSARPC_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_lsarpc); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; @@ -52,15 +50,17 @@ BOOL torture_rpc_alter_context(void) } printf("Opening secondary DSSETUP context\n"); - status = dcerpc_secondary_context(p, &p2, DCERPC_DSSETUP_UUID, DCERPC_DSSETUP_VERSION); + status = dcerpc_secondary_context(p, &p2, &dcerpc_table_dssetup); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); printf("dcerpc_alter_context failed - %s\n", nt_errstr(status)); return False; } + tmptbl = dcerpc_table_dssetup; + tmptbl.if_version += 100; printf("Opening bad secondary connection\n"); - status = dcerpc_secondary_context(p, &p2, DCERPC_DSSETUP_UUID, DCERPC_DSSETUP_VERSION+100); + status = dcerpc_secondary_context(p, &p2, &tmptbl); if (NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); printf("dcerpc_alter_context with wrong version should fail\n"); diff --git a/source4/torture/rpc/atsvc.c b/source4/torture/rpc/atsvc.c index 0be4e3ca584..4447c8ac827 100644 --- a/source4/torture/rpc/atsvc.c +++ b/source4/torture/rpc/atsvc.c @@ -142,11 +142,7 @@ BOOL torture_rpc_atsvc(void) mem_ctx = talloc_init("torture_rpc_atsvc"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_ATSVC_NAME, - DCERPC_ATSVC_UUID, - DCERPC_ATSVC_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_atsvc); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c index 4cfee1a379c..4abe9f415eb 100644 --- a/source4/torture/rpc/autoidl.c +++ b/source4/torture/rpc/autoidl.c @@ -94,8 +94,7 @@ static void reopen(TALLOC_CTX *mem_ctx, talloc_free(*p); status = torture_rpc_connection(mem_ctx, - p, iface->endpoints->names[0], - iface->uuid, iface->if_version); + p, iface); if (!NT_STATUS_IS_OK(status)) { printf("Failed to reopen '%s' - %s\n", iface->name, nt_errstr(status)); exit(1); diff --git a/source4/torture/rpc/bench.c b/source4/torture/rpc/bench.c index a2d0ba1dcf1..21afc560a08 100644 --- a/source4/torture/rpc/bench.c +++ b/source4/torture/rpc/bench.c @@ -102,9 +102,7 @@ BOOL torture_bench_rpc(void) status = torture_rpc_connection(mem_ctx, &p, - DCERPC_SRVSVC_NAME, - DCERPC_SRVSVC_UUID, - DCERPC_SRVSVC_VERSION); + &dcerpc_table_srvsvc); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/bind.c b/source4/torture/rpc/bind.c index 6ab36cf510d..d27fbb2b111 100644 --- a/source4/torture/rpc/bind.c +++ b/source4/torture/rpc/bind.c @@ -38,8 +38,6 @@ BOOL torture_multi_bind(void) { struct dcerpc_pipe *p; - const char *pipe_uuid = DCERPC_LSARPC_UUID; - uint32_t pipe_version = DCERPC_LSARPC_VERSION; struct dcerpc_binding *binding; const char *binding_string = lp_parm_string(-1, "torture", "binding"); TALLOC_CTX *mem_ctx; @@ -55,23 +53,18 @@ BOOL torture_multi_bind(void) return False; } - status = torture_rpc_connection(mem_ctx, - &p, - NULL, - pipe_uuid, - pipe_version); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_lsarpc); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; } - status = dcerpc_pipe_auth(p, binding, pipe_uuid, pipe_version, - cmdline_credentials); + status = dcerpc_pipe_auth(p, binding, &dcerpc_table_lsarpc, cmdline_credentials); if (NT_STATUS_IS_OK(status)) { printf("(incorrectly) allowed re-bind to uuid %s - %s\n", - pipe_uuid, nt_errstr(status)); + dcerpc_table_lsarpc.uuid, nt_errstr(status)); ret = False; } else { printf("\n"); diff --git a/source4/torture/rpc/countcalls.c b/source4/torture/rpc/countcalls.c index cd78e2eba46..0441191ebf9 100644 --- a/source4/torture/rpc/countcalls.c +++ b/source4/torture/rpc/countcalls.c @@ -44,8 +44,7 @@ BOOL torture_rpc_countcalls(void) return False; } - status = torture_rpc_connection(NULL, &p, iface->endpoints->names[0], - iface->uuid, iface->if_version); + status = torture_rpc_connection(NULL, &p, iface); if (!NT_STATUS_IS_OK(status)) { printf("Failed to open '%s' - %s\n", iface->name, nt_errstr(status)); return False; diff --git a/source4/torture/rpc/dcom.c b/source4/torture/rpc/dcom.c index 318e9c88eaa..92559b95bf0 100644 --- a/source4/torture/rpc/dcom.c +++ b/source4/torture/rpc/dcom.c @@ -32,10 +32,7 @@ BOOL torture_rpc_dcom(void) mem_ctx = talloc_init("torture_rpc_dcom"); - status = torture_rpc_connection(mem_ctx, &p, - DCERPC_IOXIDRESOLVER_NAME, - DCERPC_IOXIDRESOLVER_UUID, - DCERPC_IOXIDRESOLVER_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_IOXIDResolver); if (!NT_STATUS_IS_OK(status)) { ret = False; } diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c index 4e33f921fac..c455786a271 100644 --- a/source4/torture/rpc/dfs.c +++ b/source4/torture/rpc/dfs.c @@ -175,9 +175,7 @@ BOOL torture_rpc_dfs(void) status = torture_rpc_connection(mem_ctx, &p, - DCERPC_NETDFS_NAME, - DCERPC_NETDFS_UUID, - DCERPC_NETDFS_VERSION); + &dcerpc_table_netdfs); if (!NT_STATUS_IS_OK(status)) { return False; } diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c index a3310e144f8..9fbf0c21e68 100644 --- a/source4/torture/rpc/drsuapi.c +++ b/source4/torture/rpc/drsuapi.c @@ -634,9 +634,7 @@ BOOL torture_rpc_drsuapi(void) status = torture_rpc_connection(mem_ctx, &p, - DCERPC_DRSUAPI_NAME, - DCERPC_DRSUAPI_UUID, - DCERPC_DRSUAPI_VERSION); + &dcerpc_table_drsuapi); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c index 40deb18fab7..3bfc0ee18ae 100644 --- a/source4/torture/rpc/drsuapi_cracknames.c +++ b/source4/torture/rpc/drsuapi_cracknames.c @@ -784,15 +784,13 @@ BOOL torture_rpc_drsuapi_cracknames(void) status = torture_rpc_connection(mem_ctx, &p, - DCERPC_DRSUAPI_NAME, - DCERPC_DRSUAPI_UUID, - DCERPC_DRSUAPI_VERSION); + &dcerpc_table_drsuapi); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; } - printf("Connected to DRAUAPI pipe\n"); + printf("Connected to DRSUAPI pipe\n"); ZERO_STRUCT(priv); diff --git a/source4/torture/rpc/dssetup.c b/source4/torture/rpc/dssetup.c index d4f76fea90b..2469d66330d 100644 --- a/source4/torture/rpc/dssetup.c +++ b/source4/torture/rpc/dssetup.c @@ -64,10 +64,7 @@ BOOL torture_rpc_dssetup(void) mem_ctx = talloc_init("torture_rpc_dssetup"); - status = torture_rpc_connection(mem_ctx, &p, - DCERPC_DSSETUP_NAME, - DCERPC_DSSETUP_UUID, - DCERPC_DSSETUP_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_dssetup); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c index 8daba2438b2..e28ff798a8b 100644 --- a/source4/torture/rpc/dssync.c +++ b/source4/torture/rpc/dssync.c @@ -174,8 +174,7 @@ static BOOL _test_DsBind(struct DsSyncTest *ctx, struct cli_credentials *credent status = dcerpc_pipe_connect_b(ctx, &b->pipe, ctx->drsuapi_binding, - DCERPC_DRSUAPI_UUID, - DCERPC_DRSUAPI_VERSION, + &dcerpc_table_drsuapi, credentials, event); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c index ae2be1fe6cd..0064374a01a 100644 --- a/source4/torture/rpc/echo.c +++ b/source4/torture/rpc/echo.c @@ -470,9 +470,7 @@ BOOL torture_rpc_echo(void) status = torture_rpc_connection(mem_ctx, &p, - DCERPC_RPCECHO_NAME, - DCERPC_RPCECHO_UUID, - DCERPC_RPCECHO_VERSION); + &dcerpc_table_rpcecho); if (!NT_STATUS_IS_OK(status)) { return False; } diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c index 28877fa1a45..f7935ce2d75 100644 --- a/source4/torture/rpc/epmapper.c +++ b/source4/torture/rpc/epmapper.c @@ -281,11 +281,7 @@ BOOL torture_rpc_epmapper(void) mem_ctx = talloc_init("torture_rpc_epmapper"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_EPMAPPER_NAME, - DCERPC_EPMAPPER_UUID, - DCERPC_EPMAPPER_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_epmapper); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c index 576565e2475..56647cfc3ee 100644 --- a/source4/torture/rpc/eventlog.c +++ b/source4/torture/rpc/eventlog.c @@ -229,11 +229,7 @@ BOOL torture_rpc_eventlog(void) mem_ctx = talloc_init("torture_rpc_atsvc"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_EVENTLOG_NAME, - DCERPC_EVENTLOG_UUID, - DCERPC_EVENTLOG_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_eventlog); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); diff --git a/source4/torture/rpc/initshutdown.c b/source4/torture/rpc/initshutdown.c index ff1496aea41..29893d65151 100644 --- a/source4/torture/rpc/initshutdown.c +++ b/source4/torture/rpc/initshutdown.c @@ -120,11 +120,7 @@ BOOL torture_rpc_initshutdown(void) mem_ctx = talloc_init("torture_rpc_initshutdown"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_INITSHUTDOWN_NAME, - DCERPC_INITSHUTDOWN_UUID, - DCERPC_INITSHUTDOWN_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_initshutdown); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 9e5129bf5a1..0207c756bde 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -1818,11 +1818,7 @@ BOOL torture_rpc_lsa(void) mem_ctx = talloc_init("torture_rpc_lsa"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_LSARPC_NAME, - DCERPC_LSARPC_UUID, - DCERPC_LSARPC_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_lsarpc); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c index 7dfa67ce950..72495c248b9 100644 --- a/source4/torture/rpc/mgmt.c +++ b/source4/torture/rpc/mgmt.c @@ -210,9 +210,7 @@ BOOL torture_rpc_mgmt(void) printf("\nTesting pipe '%s'\n", l->table->name); if (b->transport == NCACN_IP_TCP) { - status = dcerpc_epm_map_binding(loop_ctx, b, - l->table->uuid, - l->table->if_version, NULL); + status = dcerpc_epm_map_binding(loop_ctx, b, l->table, NULL); if (!NT_STATUS_IS_OK(status)) { talloc_free(loop_ctx); printf("Failed to map port for uuid %s\n", l->table->uuid); @@ -224,11 +222,7 @@ BOOL torture_rpc_mgmt(void) lp_set_cmdline("torture:binding", dcerpc_binding_string(loop_ctx, b)); - status = torture_rpc_connection(loop_ctx, - &p, - l->table->name, - DCERPC_MGMT_UUID, - DCERPC_MGMT_VERSION); + status = torture_rpc_connection(loop_ctx, &p, &dcerpc_table_mgmt); if (!NT_STATUS_IS_OK(status)) { talloc_free(loop_ctx); ret = False; diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index a02f670439c..1958b9cdfd6 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -1436,8 +1436,7 @@ static BOOL test_ManyGetDCName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) return False; } - status = dcerpc_bind_auth_none(p2, DCERPC_LSARPC_UUID, - DCERPC_LSARPC_VERSION); + status = dcerpc_bind_auth_none(p2, &dcerpc_table_lsarpc); if (!NT_STATUS_IS_OK(status)) { printf("Failed to create bind on secondary connection\n"); return False; @@ -1526,10 +1525,7 @@ BOOL torture_rpc_netlogon(void) machine_password = cli_credentials_get_password(machine_credentials); - status = torture_rpc_connection(mem_ctx, &p, - DCERPC_NETLOGON_NAME, - DCERPC_NETLOGON_UUID, - DCERPC_NETLOGON_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_netlogon); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c index 8bb1a7ae0ab..61ef9b8ee87 100644 --- a/source4/torture/rpc/oxidresolve.c +++ b/source4/torture/rpc/oxidresolve.c @@ -227,9 +227,7 @@ BOOL torture_rpc_oxidresolve(void) status = torture_rpc_connection(mem_ctx, &premact, - DCERPC_IREMOTEACTIVATION_NAME, - DCERPC_IREMOTEACTIVATION_UUID, - DCERPC_IREMOTEACTIVATION_VERSION); + &dcerpc_table_IRemoteActivation); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); @@ -238,9 +236,7 @@ BOOL torture_rpc_oxidresolve(void) status = torture_rpc_connection(mem_ctx, &p, - DCERPC_IOXIDRESOLVER_NAME, - DCERPC_IOXIDRESOLVER_UUID, - DCERPC_IOXIDRESOLVER_VERSION); + &dcerpc_table_IOXIDResolver); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); diff --git a/source4/torture/rpc/remact.c b/source4/torture/rpc/remact.c index bbda1978546..84d0a2e35c6 100644 --- a/source4/torture/rpc/remact.c +++ b/source4/torture/rpc/remact.c @@ -105,9 +105,7 @@ BOOL torture_rpc_remact(void) status = torture_rpc_connection(mem_ctx, &p, - DCERPC_IREMOTEACTIVATION_NAME, - DCERPC_IREMOTEACTIVATION_UUID, - DCERPC_IREMOTEACTIVATION_VERSION); + &dcerpc_table_IRemoteActivation); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); diff --git a/source4/torture/rpc/rot.c b/source4/torture/rpc/rot.c index ee47fe350e9..c7694aa408a 100644 --- a/source4/torture/rpc/rot.c +++ b/source4/torture/rpc/rot.c @@ -33,9 +33,7 @@ BOOL torture_rpc_rot(void) status = torture_rpc_connection(mem_ctx, &p, - DCERPC_ROT_NAME, - DCERPC_ROT_UUID, - DCERPC_ROT_VERSION); + &dcerpc_table_rot); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c index 43ab3f98742..996d78d25f3 100644 --- a/source4/torture/rpc/samlogon.c +++ b/source4/torture/rpc/samlogon.c @@ -1537,8 +1537,7 @@ BOOL torture_rpc_samlogon(void) b->flags |= DCERPC_SCHANNEL | DCERPC_SIGN | DCERPC_SCHANNEL_128; status = dcerpc_pipe_connect_b(mem_ctx, &p, b, - DCERPC_NETLOGON_UUID, - DCERPC_NETLOGON_VERSION, + &dcerpc_table_netlogon, machine_credentials, NULL); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 42c005ab901..210e5def212 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -3350,11 +3350,7 @@ BOOL torture_rpc_samr(void) mem_ctx = talloc_init("torture_rpc_samr"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_SAMR_NAME, - DCERPC_SAMR_UUID, - DCERPC_SAMR_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_samr); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c index 7f77844459a..98fea05a1d1 100644 --- a/source4/torture/rpc/samsync.c +++ b/source4/torture/rpc/samsync.c @@ -1475,9 +1475,7 @@ BOOL torture_rpc_samsync(void) status = torture_rpc_connection(samsync_state, &samsync_state->p_lsa, - DCERPC_LSARPC_NAME, - DCERPC_LSARPC_UUID, - DCERPC_LSARPC_VERSION); + &dcerpc_table_lsarpc); if (!NT_STATUS_IS_OK(status)) { ret = False; @@ -1529,8 +1527,7 @@ BOOL torture_rpc_samsync(void) status = dcerpc_pipe_connect_b(samsync_state, &samsync_state->p, b, - DCERPC_NETLOGON_UUID, - DCERPC_NETLOGON_VERSION, + &dcerpc_table_netlogon, credentials, NULL); if (!NT_STATUS_IS_OK(status)) { @@ -1569,8 +1566,7 @@ BOOL torture_rpc_samsync(void) status = dcerpc_pipe_connect_b(samsync_state, &samsync_state->p_netlogon_wksta, b_netlogon_wksta, - DCERPC_NETLOGON_UUID, - DCERPC_NETLOGON_VERSION, + &dcerpc_table_netlogon, credentials_wksta, NULL); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c index a0adcea0ac0..1f612fbaee0 100644 --- a/source4/torture/rpc/scanner.c +++ b/source4/torture/rpc/scanner.c @@ -36,12 +36,16 @@ static BOOL test_num_calls(const struct dcerpc_interface_table *iface, int i; DATA_BLOB stub_in, stub_out; int idl_calls; + struct dcerpc_interface_table tbl; - uuid = GUID_string(mem_ctx, &id->uuid); + /* FIXME: This should be fixed when torture_rpc_connection + * takes a dcerpc_syntax_id */ + tbl.name = iface->name; + tbl.uuid = GUID_string(mem_ctx, &id->uuid); + tbl.if_version = id->if_version; status = torture_rpc_connection(mem_ctx, - &p, iface->name, - uuid, id->if_version); + &p, iface); if (!NT_STATUS_IS_OK(status)) { printf("Failed to connect to '%s' on '%s' - %s\n", uuid, iface->name, nt_errstr(status)); @@ -166,9 +170,7 @@ BOOL torture_rpc_scanner(void) printf("\nTesting pipe '%s'\n", l->table->name); if (b->transport == NCACN_IP_TCP) { - status = dcerpc_epm_map_binding(mem_ctx, b, - l->table->uuid, - l->table->if_version, NULL); + status = dcerpc_epm_map_binding(mem_ctx, b, l->table, NULL); if (!NT_STATUS_IS_OK(status)) { talloc_free(loop_ctx); printf("Failed to map port for uuid %s\n", l->table->uuid); @@ -180,11 +182,7 @@ BOOL torture_rpc_scanner(void) lp_set_cmdline("torture:binding", dcerpc_binding_string(mem_ctx, b)); - status = torture_rpc_connection(loop_ctx, - &p, - l->table->name, - DCERPC_MGMT_UUID, - DCERPC_MGMT_VERSION); + status = torture_rpc_connection(loop_ctx, &p, &dcerpc_table_mgmt); if (!NT_STATUS_IS_OK(status)) { talloc_free(loop_ctx); ret = False; diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c index 338a71d27b1..d0d7e051cbd 100644 --- a/source4/torture/rpc/schannel.c +++ b/source4/torture/rpc/schannel.c @@ -181,10 +181,7 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx, b->flags &= ~DCERPC_AUTH_OPTIONS; b->flags |= dcerpc_flags; - status = dcerpc_pipe_connect_b(test_ctx, - &p, b, - DCERPC_SAMR_UUID, - DCERPC_SAMR_VERSION, + status = dcerpc_pipe_connect_b(test_ctx, &p, b, &dcerpc_table_samr, credentials, NULL); if (!NT_STATUS_IS_OK(status)) { printf("Failed to connect with schannel: %s\n", nt_errstr(status)); @@ -201,8 +198,7 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx, * the second */ /* Swap the binding details from SAMR to NETLOGON */ - status = dcerpc_epm_map_binding(test_ctx, b, DCERPC_NETLOGON_UUID, - DCERPC_NETLOGON_VERSION, NULL); + status = dcerpc_epm_map_binding(test_ctx, b, &dcerpc_table_netlogon, NULL); if (!NT_STATUS_IS_OK(status)) { goto failed; } @@ -214,9 +210,7 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx, goto failed; } - status = dcerpc_bind_auth(p_netlogon, - DCERPC_NETLOGON_UUID, - DCERPC_NETLOGON_VERSION, + status = dcerpc_bind_auth(p_netlogon, &dcerpc_table_netlogon, credentials, DCERPC_AUTH_TYPE_SCHANNEL, NULL); @@ -236,8 +230,7 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx, } /* Swap the binding details from SAMR to LSARPC */ - status = dcerpc_epm_map_binding(test_ctx, b, DCERPC_LSARPC_UUID, - DCERPC_LSARPC_VERSION, NULL); + status = dcerpc_epm_map_binding(test_ctx, b, &dcerpc_table_lsarpc, NULL); if (!NT_STATUS_IS_OK(status)) { goto failed; } @@ -249,9 +242,7 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx, goto failed; } - status = dcerpc_bind_auth(p_lsa, - DCERPC_LSARPC_UUID, - DCERPC_LSARPC_VERSION, + status = dcerpc_bind_auth(p_lsa, &dcerpc_table_lsarpc, credentials, DCERPC_AUTH_TYPE_SCHANNEL, NULL); diff --git a/source4/torture/rpc/session_key.c b/source4/torture/rpc/session_key.c index 035ab7ace2e..898991d88ee 100644 --- a/source4/torture/rpc/session_key.c +++ b/source4/torture/rpc/session_key.c @@ -169,9 +169,7 @@ BOOL torture_rpc_lsa_secrets(void) status = torture_rpc_connection(mem_ctx, &p, - DCERPC_LSARPC_NAME, - DCERPC_LSARPC_UUID, - DCERPC_LSARPC_VERSION); + &dcerpc_table_lsarpc); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 76c8673d4fe..89407e33cc1 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -1622,8 +1622,7 @@ static BOOL test_SecondaryClosePrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ct return False; } - status = dcerpc_bind_auth_none(p2, DCERPC_SPOOLSS_UUID, - DCERPC_SPOOLSS_VERSION); + status = dcerpc_bind_auth_none(p2, &dcerpc_table_spoolss); if (!NT_STATUS_IS_OK(status)) { printf("Failed to create bind on secondary connection\n"); talloc_free(p2); @@ -2059,11 +2058,7 @@ BOOL torture_rpc_spoolss(void) mem_ctx = talloc_init("torture_rpc_spoolss"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_SPOOLSS_NAME, - DCERPC_SPOOLSS_UUID, - DCERPC_SPOOLSS_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_spoolss); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c index 13b6cde675e..422e06f0560 100644 --- a/source4/torture/rpc/srvsvc.c +++ b/source4/torture/rpc/srvsvc.c @@ -719,11 +719,7 @@ BOOL torture_rpc_srvsvc(void) mem_ctx = talloc_init("torture_rpc_srvsvc"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_SRVSVC_NAME, - DCERPC_SRVSVC_UUID, - DCERPC_SRVSVC_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_srvsvc); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c index 44b79058a95..102e3bad910 100644 --- a/source4/torture/rpc/svcctl.c +++ b/source4/torture/rpc/svcctl.c @@ -117,11 +117,7 @@ BOOL torture_rpc_svcctl(void) mem_ctx = talloc_init("torture_rpc_svcctl"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_SVCCTL_NAME, - DCERPC_SVCCTL_UUID, - DCERPC_SVCCTL_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_svcctl); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index 66cb4a42c14..80342fa8bc2 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -128,9 +128,7 @@ struct test_join *torture_create_testuser(const char *username, status = torture_rpc_connection(join, &join->p, - DCERPC_SAMR_NAME, - DCERPC_SAMR_UUID, - DCERPC_SAMR_VERSION); + &dcerpc_table_samr); if (!NT_STATUS_IS_OK(status)) { return NULL; } diff --git a/source4/torture/rpc/unixinfo.c b/source4/torture/rpc/unixinfo.c index caa268b0c89..24d6a30d55e 100644 --- a/source4/torture/rpc/unixinfo.c +++ b/source4/torture/rpc/unixinfo.c @@ -72,10 +72,7 @@ BOOL torture_rpc_unixinfo(void) mem_ctx = talloc_init("torture_rpc_unixinfo"); - status = torture_rpc_connection(mem_ctx, &p, - DCERPC_UNIXINFO_NAME, - DCERPC_UNIXINFO_UUID, - DCERPC_UNIXINFO_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_unixinfo); if (!NT_STATUS_IS_OK(status)) { return False; } diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index cfcb91cafb6..3aaa7521fa5 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -798,11 +798,7 @@ BOOL torture_rpc_winreg(void) int i; mem_ctx = talloc_init("torture_rpc_winreg"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_WINREG_NAME, - DCERPC_WINREG_UUID, - DCERPC_WINREG_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_winreg); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c index 7b8388b125e..7e71fc29b26 100644 --- a/source4/torture/rpc/wkssvc.c +++ b/source4/torture/rpc/wkssvc.c @@ -95,11 +95,7 @@ BOOL torture_rpc_wkssvc(void) mem_ctx = talloc_init("torture_rpc_wkssvc"); - status = torture_rpc_connection(mem_ctx, - &p, - DCERPC_WKSSVC_NAME, - DCERPC_WKSSVC_UUID, - DCERPC_WKSSVC_VERSION); + status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_wkssvc); if (!NT_STATUS_IS_OK(status)) { talloc_free(mem_ctx); return False; |