binding = talloc_asprintf(mem_ctx, "ncacn_np:%s", query_host);
status = dcerpc_pipe_connect(mem_ctx, &p, binding,
- &dcerpc_table_srvsvc,
+ &ndr_table_srvsvc,
cmdline_credentials, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Failed to connect to %s - %s\n",
st->drsuapi = talloc_zero(st, struct dreplsrv_drsuapi_connection);
if (composite_nomem(st->drsuapi, c)) return c;
- creq = dcerpc_pipe_connect_b_send(st, conn->binding, &dcerpc_table_drsuapi,
+ creq = dcerpc_pipe_connect_b_send(st, conn->binding, &ndr_table_drsuapi,
conn->service->system_session_info->credentials,
c->event_ctx);
composite_continue(c, creq, dreplsrv_out_drsuapi_connect_recv, st);
/* register a server function with the irpc messaging system */
#define IRPC_REGISTER(msg_ctx, pipename, funcname, function, private) \
- irpc_register(msg_ctx, &dcerpc_table_ ## pipename, \
+ irpc_register(msg_ctx, &ndr_table_ ## pipename, \
DCERPC_ ## funcname, \
(irpc_function_t)function, private)
/* make a irpc call */
#define IRPC_CALL(msg_ctx, server_id, pipename, funcname, ptr, ctx) \
- irpc_call(msg_ctx, server_id, &dcerpc_table_ ## pipename, DCERPC_ ## funcname, ptr, ctx)
+ irpc_call(msg_ctx, server_id, &ndr_table_ ## pipename, DCERPC_ ## funcname, ptr, ctx)
#define IRPC_CALL_SEND(msg_ctx, server_id, pipename, funcname, ptr, ctx) \
- irpc_call_send(msg_ctx, server_id, &dcerpc_table_ ## pipename, DCERPC_ ## funcname, ptr, ctx)
+ irpc_call_send(msg_ctx, server_id, &ndr_table_ ## pipename, DCERPC_ ## funcname, ptr, ctx)
/*
status = dcerpc_pipe_connect(*ctx /* TALLOC_CTX */,
&p, location,
- &dcerpc_table_winreg,
+ &ndr_table_winreg,
credentials, ev);
(*ctx)->backend_data = p;
state->r.in.domain_sid = state->domain_sid;
ireq = irpc_call_send(state->msg_ctx, nbt_servers[0],
- &dcerpc_table_irpc, DCERPC_NBTD_GETDCNAME,
+ &ndr_table_irpc, DCERPC_NBTD_GETDCNAME,
&state->r, state);
if (!ireq) {
fallback_node_status(state);
}
/* bind to the LSA pipe */
- status = dcerpc_bind_auth_none(lsa->pipe, &dcerpc_table_lsarpc);
+ status = dcerpc_bind_auth_none(lsa->pipe, &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(lsa);
return status;
if (!composite_is_ok(c)) return;
}
- creq = dcerpc_pipe_connect_b_send(s, drsuapi->binding, &dcerpc_table_drsuapi,
+ creq = dcerpc_pipe_connect_b_send(s, drsuapi->binding, &ndr_table_drsuapi,
s->libnet->cred, s->libnet->event_ctx);
composite_continue(c, creq, recv_fn, s);
}
/* attempting to connect a domain controller */
s->rpcconn.level = LIBNET_RPC_CONNECT_DC;
s->rpcconn.in.name = io->in.domain_name;
- s->rpcconn.in.dcerpc_iface = &dcerpc_table_samr;
+ s->rpcconn.in.dcerpc_iface = &ndr_table_samr;
/* send rpc pipe connect request */
rpcconn_req = libnet_RpcConnect_send(ctx, c, &s->rpcconn, s->monitor_fn);
/* attempting to connect a domain controller */
s->rpcconn.level = LIBNET_RPC_CONNECT_DC;
s->rpcconn.in.name = talloc_strdup(c, io->in.domain_name);
- s->rpcconn.in.dcerpc_iface = &dcerpc_table_lsarpc;
+ s->rpcconn.in.dcerpc_iface = &ndr_table_lsarpc;
/* send rpc pipe connect request */
rpcconn_req = libnet_RpcConnect_send(ctx, c, &s->rpcconn, s->monitor_fn);
/* prepare rpc connect call */
s->rpcconn.level = LIBNET_RPC_CONNECT_SERVER;
s->rpcconn.in.name = s->hostname;
- s->rpcconn.in.dcerpc_iface = &dcerpc_table_samr;
+ s->rpcconn.in.dcerpc_iface = &ndr_table_samr;
rpcconn_req = libnet_RpcConnect_send(ctx, c, &s->rpcconn, s->monitor_fn);
if (composite_nomem(rpcconn_req, c)) return c;
status = dcerpc_pipe_connect_b(tmp_ctx,
&drsuapi_pipe,
drsuapi_binding,
- &dcerpc_table_drsuapi,
+ &ndr_table_drsuapi,
ctx->cred,
ctx->event_ctx);
if (!NT_STATUS_IS_OK(status)) {
/* This level makes a connection to the LSA pipe on the way,
* to get some useful bits of information about the domain */
connect_with_info->level = LIBNET_RPC_CONNECT_DC_INFO;
- connect_with_info->in.dcerpc_iface = &dcerpc_table_samr;
+ connect_with_info->in.dcerpc_iface = &ndr_table_samr;
/*
establish the SAMR connection
status = dcerpc_pipe_auth(tmp_ctx, &samr_pipe,
connect_with_info->out.dcerpc_pipe->binding,
- &dcerpc_table_samr, ctx->cred);
+ &ndr_table_samr, ctx->cred);
if (!NT_STATUS_IS_OK(status)) {
r->out.error_string = talloc_asprintf(mem_ctx,
"SAMR bind failed: %s",
/* prepare connect to the SAMR pipe of the users domain PDC */
c.level = LIBNET_RPC_CONNECT_PDC;
c.in.name = r->samr.in.domain_name;
- c.in.dcerpc_iface = &dcerpc_table_samr;
+ c.in.dcerpc_iface = &ndr_table_samr;
/* 1. connect to the SAMR pipe of users domain PDC (maybe a standalone server or workstation) */
status = libnet_RpcConnect(ctx, mem_ctx, &c);
/* prepare connect to the SAMR pipe of users domain PDC */
c.level = LIBNET_RPC_CONNECT_PDC;
c.in.name = r->samr.in.domain_name;
- c.in.dcerpc_iface = &dcerpc_table_samr;
+ c.in.dcerpc_iface = &ndr_table_samr;
/* 1. connect to the SAMR pipe of users domain PDC (maybe a standalone server or workstation) */
status = libnet_RpcConnect(ctx, mem_ctx, &c);
/* reference created pipe structure to long-term libnet_context
so that it can be used by other api functions even after short-term
mem_ctx is freed */
- if (r->in.dcerpc_iface == &dcerpc_table_samr) {
+ if (r->in.dcerpc_iface == &ndr_table_samr) {
ctx->samr.pipe = talloc_reference(ctx, r->out.dcerpc_pipe);
- } else if (r->in.dcerpc_iface == &dcerpc_table_lsarpc) {
+ } else if (r->in.dcerpc_iface == &ndr_table_lsarpc) {
ctx->lsa.pipe = talloc_reference(ctx, r->out.dcerpc_pipe);
}
/* reference created pipe structure to long-term libnet_context
so that it can be used by other api functions even after short-term
mem_ctx is freed */
- if (r->in.dcerpc_iface == &dcerpc_table_samr) {
+ if (r->in.dcerpc_iface == &ndr_table_samr) {
ctx->samr.pipe = talloc_reference(ctx, r->out.dcerpc_pipe);
- } else if (r->in.dcerpc_iface == &dcerpc_table_lsarpc) {
+ } else if (r->in.dcerpc_iface == &ndr_table_lsarpc) {
ctx->lsa.pipe = talloc_reference(ctx, r->out.dcerpc_pipe);
}
}
/* we need to query information on lsarpc interface first */
- s->rpc_conn.in.dcerpc_iface = &dcerpc_table_lsarpc;
+ s->rpc_conn.in.dcerpc_iface = &ndr_table_lsarpc;
/* request connection to the lsa pipe on the pdc */
conn_req = libnet_RpcConnect_send(ctx, c, &s->rpc_conn, s->monitor_fn);
/* reference created pipe structure to long-term libnet_context
so that it can be used by other api functions even after short-term
mem_ctx is freed */
- if (r->in.dcerpc_iface == &dcerpc_table_samr) {
+ if (r->in.dcerpc_iface == &ndr_table_samr) {
ctx->samr.pipe = talloc_reference(ctx, r->out.dcerpc_pipe);
- } else if (r->in.dcerpc_iface == &dcerpc_table_lsarpc) {
+ } else if (r->in.dcerpc_iface == &ndr_table_lsarpc) {
ctx->lsa.pipe = talloc_reference(ctx, r->out.dcerpc_pipe);
}
c.level = LIBNET_RPC_CONNECT_SERVER;
c.in.name = r->in.server_name;
- c.in.dcerpc_iface = &dcerpc_table_srvsvc;
+ c.in.dcerpc_iface = &ndr_table_srvsvc;
s.in.server_unc = talloc_asprintf(mem_ctx, "\\\\%s", c.in.name);
c.level = LIBNET_RPC_CONNECT_SERVER;
c.in.name = r->in.server_name;
- c.in.dcerpc_iface = &dcerpc_table_srvsvc;
+ c.in.dcerpc_iface = &ndr_table_srvsvc;
status = libnet_RpcConnect(ctx, mem_ctx, &c);
if (!NT_STATUS_IS_OK(status)) {
c.level = LIBNET_RPC_CONNECT_SERVER;
c.in.name = r->in.server_name;
- c.in.dcerpc_iface = &dcerpc_table_srvsvc;
+ c.in.dcerpc_iface = &ndr_table_srvsvc;
status = libnet_RpcConnect(ctx, mem_ctx, &c);
if (!NT_STATUS_IS_OK(status)) {
/* prepare connect to the SRVSVC pipe of a timeserver */
c.level = LIBNET_RPC_CONNECT_SERVER;
c.in.name = r->srvsvc.in.server_name;
- c.in.dcerpc_iface = &dcerpc_table_srvsvc;
+ c.in.dcerpc_iface = &ndr_table_srvsvc;
/* 1. connect to the SRVSVC pipe of a timeserver */
status = libnet_RpcConnect(ctx, mem_ctx, &c);
talloc_free(binding_str);
if (!composite_is_ok(c)) return;
- creq = dcerpc_pipe_connect_b_send(s, s->drsuapi.binding, &dcerpc_table_drsuapi,
+ creq = dcerpc_pipe_connect_b_send(s, s->drsuapi.binding, &ndr_table_drsuapi,
s->libnet->cred, s->libnet->event_ctx);
composite_continue(c, creq, unbecomeDC_drsuapi_connect_recv, s);
}
}
/* prepare connect to the NETLOGON pipe of PDC */
- c->in.dcerpc_iface = &dcerpc_table_netlogon;
+ c->in.dcerpc_iface = &ndr_table_netlogon;
/* We must do this as the machine, not as any command-line
* user. So we override the credentials in the
return nt_status;
}
- nt_status = dcerpc_bind_auth_schannel(samsync_ctx, p, &dcerpc_table_netlogon,
+ nt_status = dcerpc_bind_auth_schannel(samsync_ctx, p, &ndr_table_netlogon,
machine_account, DCERPC_AUTH_LEVEL_PRIVACY);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_steal(s, s->pipe2);
/* initiate a non-authenticated bind */
- auth_none_req = dcerpc_bind_auth_none_send(c, s->pipe2, &dcerpc_table_netlogon);
+ auth_none_req = dcerpc_bind_auth_none_send(c, s->pipe2, &ndr_table_netlogon);
if (composite_nomem(auth_none_req, c)) return;
composite_continue(c, auth_none_req, continue_bind_auth_none, c);
/* request the netlogon endpoint mapping */
epm_map_req = dcerpc_epm_map_binding_send(c, s->binding,
- &dcerpc_table_netlogon,
+ &ndr_table_netlogon,
s->pipe->conn->event_ctx);
if (composite_nomem(epm_map_req, c)) return c;
epmapper_binding->endpoint = NULL;
/* initiate rpc pipe connection */
- pipe_connect_req = dcerpc_pipe_connect_b_send(c, epmapper_binding, &dcerpc_table_epmapper,
+ pipe_connect_req = dcerpc_pipe_connect_b_send(c, epmapper_binding, &ndr_table_epmapper,
anon_creds, c->event_ctx);
if (composite_nomem(pipe_connect_req, c)) return c;
NTSTATUS dcerpc_register_builtin_interfaces(void);
-NTSTATUS dcerpc_table_init(void)
+NTSTATUS ndr_table_init(void)
{
static BOOL initialized = False;
return NULL;
}
- symbol = talloc_asprintf(NULL, "dcerpc_table_%s", pipe_name);
+ symbol = talloc_asprintf(NULL, "ndr_table_%s", pipe_name);
p = dlsym(handle, symbol);
if (!p) {
};
#if (_SAMBA_BUILD_ >= 4)
- dcerpc_table_init();
+ ndr_table_init();
#else
/* Initialise samba stuff */
load_case_tables();
my ($self, $d, $iface) = @_;
my $name = $d->{NAME};
my $callnum = uc("DCERPC_$name");
- my $table = "&dcerpc_table_$iface";
+ my $table = "&ndr_table_$iface";
$self->pidl("static int ejs_$name(int eid, int argc, struct MprVar **argv)");
$self->pidl("{");
NDR_PRINT_IN_DEBUG($name, r);
}
- return dcerpc_ndr_request_send(p, NULL, &dcerpc_table_$interface->{NAME}, DCERPC_$uname, mem_ctx, r);
+ return dcerpc_ndr_request_send(p, NULL, &ndr_table_$interface->{NAME}, DCERPC_$uname, mem_ctx, r);
}
NTSTATUS dcerpc_$name(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *r)
$res_hdr .= "#define _HEADER_RPC_$interface->{NAME}\n\n";
if (defined $interface->{PROPERTIES}->{uuid}) {
- $res_hdr .= "extern const struct ndr_interface_table dcerpc_table_$interface->{NAME};\n";
+ $res_hdr .= "extern const struct ndr_interface_table ndr_table_$interface->{NAME};\n";
}
$res .= "/* $interface->{NAME} - client functions generated by pidl */\n\n";
$self->pidl("};");
$self->pidl("");
- $self->pidl("\nconst struct ndr_interface_table dcerpc_table_$interface->{NAME} = {");
+ $self->pidl("\nconst struct ndr_interface_table ndr_table_$interface->{NAME} = {");
$self->pidl("\t.name\t\t= \"$interface->{NAME}\",");
$self->pidl("\t.syntax_id\t= {");
$self->pidl("\t\t" . print_uuid($interface->{UUID}) .",");
if(!defined $interface->{PROPERTIES}->{helpstring}) { $interface->{PROPERTIES}->{helpstring} = "NULL"; }
$self->pidl_hdr("#define DCERPC_$name\_HELPSTRING $interface->{PROPERTIES}->{helpstring}");
- $self->pidl_hdr("extern const struct ndr_interface_table dcerpc_table_$interface->{NAME};");
+ $self->pidl_hdr("extern const struct ndr_interface_table ndr_table_$interface->{NAME};");
$self->pidl_hdr("NTSTATUS dcerpc_server_$interface->{NAME}_init(void);");
}
dce_call->fault_code = 0;
- if (opnum >= dcerpc_table_$name.num_calls) {
+ if (opnum >= ndr_table_$name.num_calls) {
dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
return NT_STATUS_NET_WRITE_FAULT;
}
- *r = talloc_size(mem_ctx, dcerpc_table_$name.calls[opnum].struct_size);
+ *r = talloc_size(mem_ctx, ndr_table_$name.calls[opnum].struct_size);
NT_STATUS_HAVE_NO_MEMORY(*r);
/* unravel the NDR for the packet */
- status = dcerpc_table_$name.calls[opnum].ndr_pull(pull, NDR_IN, *r);
+ status = ndr_table_$name.calls[opnum].ndr_pull(pull, NDR_IN, *r);
if (!NT_STATUS_IS_OK(status)) {
- dcerpc_log_packet(&dcerpc_table_$name, opnum, NDR_IN,
+ dcerpc_log_packet(&ndr_table_$name, opnum, NDR_IN,
&dce_call->pkt.u.request.stub_and_verifier);
dce_call->fault_code = DCERPC_FAULT_NDR;
return NT_STATUS_NET_WRITE_FAULT;
}
if (dce_call->fault_code != 0) {
- dcerpc_log_packet(&dcerpc_table_$name, opnum, NDR_IN,
+ dcerpc_log_packet(&ndr_table_$name, opnum, NDR_IN,
&dce_call->pkt.u.request.stub_and_verifier);
return NT_STATUS_NET_WRITE_FAULT;
}
}
if (dce_call->fault_code != 0) {
- dcerpc_log_packet(&dcerpc_table_$name, opnum, NDR_IN,
+ dcerpc_log_packet(&ndr_table_$name, opnum, NDR_IN,
&dce_call->pkt.u.request.stub_and_verifier);
return NT_STATUS_NET_WRITE_FAULT;
}
NTSTATUS status;
uint16_t opnum = dce_call->pkt.u.request.opnum;
- status = dcerpc_table_$name.calls[opnum].ndr_push(push, NDR_OUT, r);
+ status = ndr_table_$name.calls[opnum].ndr_push(push, NDR_OUT, r);
if (!NT_STATUS_IS_OK(status)) {
dce_call->fault_code = DCERPC_FAULT_NDR;
return NT_STATUS_NET_WRITE_FAULT;
{
int i;
- for (i=0;i<dcerpc_table_$name.endpoints->count;i++) {
+ for (i=0;i<ndr_table_$name.endpoints->count;i++) {
NTSTATUS ret;
- const char *name = dcerpc_table_$name.endpoints->names[i];
+ const char *name = ndr_table_$name.endpoints->names[i];
ret = dcesrv_interface_register(dce_ctx, name, &dcesrv_$name\_interface, NULL);
if (!NT_STATUS_IS_OK(ret)) {
pidl "struct $if->{NAME} *ret = talloc(mem_ctx, struct $if->{NAME});";
pidl "NTSTATUS status;";
pidl "";
- pidl "status = dcerpc_pipe_connect(mem_ctx, &ret->pipe, binding, &dcerpc_table_$if->{NAME}, cred, event);";
+ pidl "status = dcerpc_pipe_connect(mem_ctx, &ret->pipe, binding, &ndr_table_$if->{NAME}, cred, event);";
pidl "if (NT_STATUS_IS_ERR(status)) {";
pidl "\tntstatus_exception(status);";
pidl "\treturn NULL;";
}
/* We need the full DCE/RPC interface table */
- dcerpc_table_init();
+ ndr_table_init();
return ret;
}
*/
int ejs_rpc_init(struct MprVar *obj, const char *name)
{
- dcerpc_table_init();
+ ndr_table_init();
mprSetStringCFunction(obj, "connect", ejs_rpc_connect);
if (mprGetProperty(obj, "pipe_name", NULL) == NULL) {
status = torture_rpc_connection(mem_ctx,
&net_ctx->samr.pipe,
- &dcerpc_table_samr);
+ &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
return False;
ctx->cred = cmdline_credentials;
mem_ctx = talloc_init("torture_domain_close_lsa");
- status = dcerpc_pipe_connect(mem_ctx, &p, bindstr, &dcerpc_table_lsarpc,
+ status = dcerpc_pipe_connect(mem_ctx, &p, bindstr, &ndr_table_lsarpc,
cmdline_credentials, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to connect to server %s: %s\n", bindstr,
ctx->cred = cmdline_credentials;
mem_ctx = talloc_init("torture_domain_close_samr");
- status = dcerpc_pipe_connect(mem_ctx, &p, bindstr, &dcerpc_table_samr,
+ status = dcerpc_pipe_connect(mem_ctx, &p, bindstr, &ndr_table_samr,
ctx->cred, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to connect to server %s: %s\n", bindstr,
ctx->cred = cmdline_credentials;
d_printf("Testing connection to LSA interface\n");
- if (!test_connect_service(ctx, &dcerpc_table_lsarpc, bindstr,
+ if (!test_connect_service(ctx, &ndr_table_lsarpc, bindstr,
hostname, level, False, NT_STATUS_OK)) {
d_printf("failed to connect LSA interface\n");
return False;
}
d_printf("Testing connection to SAMR interface\n");
- if (!test_connect_service(ctx, &dcerpc_table_samr, bindstr,
+ if (!test_connect_service(ctx, &ndr_table_samr, bindstr,
hostname, level, False, NT_STATUS_OK)) {
d_printf("failed to connect SAMR interface\n");
return False;
}
d_printf("Testing connection to SRVSVC interface\n");
- if (!test_connect_service(ctx, &dcerpc_table_srvsvc, bindstr,
+ if (!test_connect_service(ctx, &ndr_table_srvsvc, bindstr,
hostname, level, False, NT_STATUS_OK)) {
d_printf("failed to connect SRVSVC interface\n");
return False;
}
d_printf("Testing connection to LSA interface with wrong credentials\n");
- if (!test_connect_service(ctx, &dcerpc_table_lsarpc, bindstr,
+ if (!test_connect_service(ctx, &ndr_table_lsarpc, bindstr,
hostname, level, True, NT_STATUS_LOGON_FAILURE)) {
d_printf("failed to test wrong credentials on LSA interface\n");
return False;
}
d_printf("Testing connection to SAMR interface with wrong credentials\n");
- if (!test_connect_service(ctx, &dcerpc_table_samr, bindstr,
+ if (!test_connect_service(ctx, &ndr_table_samr, bindstr,
hostname, level, True, NT_STATUS_LOGON_FAILURE)) {
d_printf("failed to test wrong credentials on SAMR interface\n");
return False;
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_srvsvc);
+ &ndr_table_srvsvc);
if (!test_addshare(p, mem_ctx, host, TEST_SHARENAME)) {
ret = False;
status = torture_rpc_connection(prep_mem_ctx,
&p,
- &dcerpc_table_samr);
+ &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
ret = False;
goto done;
status = torture_rpc_connection(prep_mem_ctx,
&p,
- &dcerpc_table_samr);
+ &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
ret = False;
goto done;
status = torture_rpc_connection(prep_mem_ctx,
&p,
- &dcerpc_table_samr);
+ &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
return False;
}
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_samr);
+ &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
return False;
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_samr);
+ &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
return False;
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_samr);
+ &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
return False;
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_samr);
+ &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
ret = False;
mem_ctx = talloc_init("torture_rpc_alter_context");
printf("opening LSA connection\n");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_lsarpc);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
}
printf("Opening secondary DSSETUP context\n");
- status = dcerpc_secondary_context(p, &p2, &dcerpc_table_dssetup);
+ status = dcerpc_secondary_context(p, &p2, &ndr_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 = ndr_table_dssetup;
tmptbl.syntax_id.if_version += 100;
printf("Opening bad secondary connection\n");
status = dcerpc_secondary_context(p, &p2, &tmptbl);
/* send bind requests */
for (i = 0; i < torture_numasync; i++) {
- table[i] = &dcerpc_table_lsarpc;
+ table[i] = &ndr_table_lsarpc;
bind_req[i] = dcerpc_pipe_connect_send(mem_ctx, binding_string,
table[i], creds, evt_ctx);
}
struct torture_tcase *tcase;
tcase = torture_suite_add_rpc_iface_tcase(suite, "atsvc",
- &dcerpc_table_atsvc);
+ &ndr_table_atsvc);
torture_rpc_tcase_add_test(tcase, "JobEnum", test_JobEnum);
torture_rpc_tcase_add_test(tcase, "JobAdd", test_JobAdd);
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_srvsvc);
+ &ndr_table_srvsvc);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
return False;
}
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_lsarpc);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
}
- status = dcerpc_pipe_auth(mem_ctx, &p, binding, &dcerpc_table_lsarpc, cmdline_credentials);
+ status = dcerpc_pipe_auth(mem_ctx, &p, binding, &ndr_table_lsarpc, cmdline_credentials);
if (NT_STATUS_IS_OK(status)) {
printf("(incorrectly) allowed re-bind to uuid %s - %s\n",
- GUID_string(mem_ctx, &dcerpc_table_lsarpc.syntax_id.uuid), nt_errstr(status));
+ GUID_string(mem_ctx, &ndr_table_lsarpc.syntax_id.uuid), nt_errstr(status));
ret = False;
} else {
printf("\n");
mem_ctx = talloc_init("torture_rpc_dcom");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_IOXIDResolver);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_IOXIDResolver);
if (!NT_STATUS_IS_OK(status)) {
ret = False;
}
#if 0
struct torture_tcase *tcase = torture_suite_add_rpc_iface_tcase(suite,
- "dfs", &dcerpc_table_netdfs);
+ "dfs", &ndr_table_netdfs);
torture_rpc_tcase_add_test(tcase, "GetManagerVersion",
test_GetManagerVersion);
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_drsuapi);
+ &ndr_table_drsuapi);
if (!NT_STATUS_IS_OK(status)) {
torture_leave_domain(priv.join);
talloc_free(mem_ctx);
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_drsuapi);
+ &ndr_table_drsuapi);
if (!NT_STATUS_IS_OK(status)) {
torture_leave_domain(priv.join);
talloc_free(mem_ctx);
mem_ctx = talloc_init("torture_rpc_dssetup");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_dssetup);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_dssetup);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
status = dcerpc_pipe_connect_b(ctx,
&b->pipe, ctx->drsuapi_binding,
- &dcerpc_table_drsuapi,
+ &ndr_table_drsuapi,
credentials, event);
if (!NT_STATUS_IS_OK(status)) {
struct torture_tcase *tcase;
tcase = torture_suite_add_rpc_iface_tcase(suite, "echo",
- &dcerpc_table_rpcecho);
+ &ndr_table_rpcecho);
torture_rpc_tcase_add_test(tcase, "addone", test_addone);
torture_rpc_tcase_add_test(tcase, "sinkdata", test_sinkdata);
struct epm_InqObject r;
r.in.epm_object = talloc(mem_ctx, struct GUID);
- *r.in.epm_object = dcerpc_table_epmapper.syntax_id.uuid;
+ *r.in.epm_object = ndr_table_epmapper.syntax_id.uuid;
status = dcerpc_epm_InqObject(p, mem_ctx, &r);
if (NT_STATUS_IS_ERR(status)) {
mem_ctx = talloc_init("torture_rpc_epmapper");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_epmapper);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_epmapper);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
suite = torture_suite_create(talloc_autofree_context(), "EVENTLOG");
tcase = torture_suite_add_rpc_iface_tcase(suite, "eventlog",
- &dcerpc_table_eventlog);
+ &ndr_table_eventlog);
torture_rpc_tcase_add_test(tcase, "OpenEventLog", test_OpenEventLog);
torture_rpc_tcase_add_test(tcase, "ClearEventLog", test_ClearEventLog);
torture_comment(torture, "RPC-HANDLE-LSARPC\n");
- status = torture_rpc_connection(mem_ctx, &p1, &dcerpc_table_lsarpc);
+ status = torture_rpc_connection(mem_ctx, &p1, &ndr_table_lsarpc);
torture_assert_ntstatus_ok(torture, status, "opening lsa pipe1");
- status = torture_rpc_connection(mem_ctx, &p2, &dcerpc_table_lsarpc);
+ status = torture_rpc_connection(mem_ctx, &p2, &ndr_table_lsarpc);
torture_assert_ntstatus_ok(torture, status, "opening lsa pipe1");
qos.len = 0;
}
torture_comment(torture, "connect lsa pipe1\n");
- status = torture_rpc_connection(mem_ctx, &p1, &dcerpc_table_lsarpc);
+ status = torture_rpc_connection(mem_ctx, &p1, &ndr_table_lsarpc);
torture_assert_ntstatus_ok(torture, status, "opening lsa pipe1");
transport = p1->conn->transport.transport,
torture_comment(torture, "use assoc_group_id[0x%08X] for new connections\n", assoc_group_id);
torture_comment(torture, "connect lsa pipe2\n");
- status = torture_rpc_connection_transport(mem_ctx, &p2, &dcerpc_table_lsarpc,
+ status = torture_rpc_connection_transport(mem_ctx, &p2, &ndr_table_lsarpc,
transport,
assoc_group_id);
torture_assert_ntstatus_ok(torture, status, "opening lsa pipe2");
* connect p3 after the policy handle is opened
*/
torture_comment(torture, "connect lsa pipe3 after the policy handle is opened\n");
- status = torture_rpc_connection_transport(mem_ctx, &p3, &dcerpc_table_lsarpc,
+ status = torture_rpc_connection_transport(mem_ctx, &p3, &ndr_table_lsarpc,
transport,
assoc_group_id);
torture_assert_ntstatus_ok(torture, status, "opening lsa pipe3");
* and use the handle on it
*/
torture_comment(torture, "connect lsa pipe4 and use policy handle\n");
- status = torture_rpc_connection_transport(mem_ctx, &p4, &dcerpc_table_lsarpc,
+ status = torture_rpc_connection_transport(mem_ctx, &p4, &ndr_table_lsarpc,
transport,
assoc_group_id);
torture_assert_ntstatus_ok(torture, status, "opening lsa pipe4");
* now open p5
*/
torture_comment(torture, "connect lsa pipe5 - should fail\n");
- status = torture_rpc_connection_transport(mem_ctx, &p5, &dcerpc_table_lsarpc,
+ status = torture_rpc_connection_transport(mem_ctx, &p5, &ndr_table_lsarpc,
transport,
assoc_group_id);
torture_assert_ntstatus_equal(torture, status, NT_STATUS_UNSUCCESSFUL,
torture_comment(torture, "RPC-HANDLE-SAMR\n");
- status = torture_rpc_connection(mem_ctx, &p1, &dcerpc_table_samr);
+ status = torture_rpc_connection(mem_ctx, &p1, &ndr_table_samr);
torture_assert_ntstatus_ok(torture, status, "opening samr pipe1");
- status = torture_rpc_connection(mem_ctx, &p2, &dcerpc_table_samr);
+ status = torture_rpc_connection(mem_ctx, &p2, &ndr_table_samr);
torture_assert_ntstatus_ok(torture, status, "opening samr pipe1");
r.in.system_name = 0;
}
torture_comment(torture, "connect samr pipe1\n");
- status = torture_rpc_connection(mem_ctx, &p1, &dcerpc_table_samr);
+ status = torture_rpc_connection(mem_ctx, &p1, &ndr_table_samr);
torture_assert_ntstatus_ok(torture, status, "opening samr pipe1");
transport = p1->conn->transport.transport,
torture_comment(torture, "use assoc_group_id[0x%08X] for new connections\n", assoc_group_id);
torture_comment(torture, "connect lsa pipe2\n");
- status = torture_rpc_connection_transport(mem_ctx, &p2, &dcerpc_table_lsarpc,
+ status = torture_rpc_connection_transport(mem_ctx, &p2, &ndr_table_lsarpc,
transport,
assoc_group_id);
torture_assert_ntstatus_ok(torture, status, "opening lsa pipe2");
msleep(10);
torture_comment(torture, "connect samr pipe3 - should fail\n");
- status = torture_rpc_connection_transport(mem_ctx, &p3, &dcerpc_table_samr,
+ status = torture_rpc_connection_transport(mem_ctx, &p3, &ndr_table_samr,
transport,
assoc_group_id);
torture_assert_ntstatus_equal(torture, status, NT_STATUS_UNSUCCESSFUL,
"opening samr pipe3");
torture_comment(torture, "connect lsa pipe4 - should fail\n");
- status = torture_rpc_connection_transport(mem_ctx, &p4, &dcerpc_table_lsarpc,
+ status = torture_rpc_connection_transport(mem_ctx, &p4, &ndr_table_lsarpc,
transport,
assoc_group_id);
torture_assert_ntstatus_equal(torture, status, NT_STATUS_UNSUCCESSFUL,
"opening lsa pipe4");
torture_comment(torture, "connect samr pipe5 with assoc_group_id[0x%08X]- should fail\n", ++assoc_group_id);
- status = torture_rpc_connection_transport(mem_ctx, &p5, &dcerpc_table_samr,
+ status = torture_rpc_connection_transport(mem_ctx, &p5, &ndr_table_samr,
transport,
assoc_group_id);
torture_assert_ntstatus_equal(torture, status, NT_STATUS_UNSUCCESSFUL,
"opening samr pipe5");
torture_comment(torture, "connect lsa pipe6 with assoc_group_id[0x%08X]- should fail\n", ++assoc_group_id);
- status = torture_rpc_connection_transport(mem_ctx, &p6, &dcerpc_table_lsarpc,
+ status = torture_rpc_connection_transport(mem_ctx, &p6, &ndr_table_lsarpc,
transport,
assoc_group_id);
torture_assert_ntstatus_equal(torture, status, NT_STATUS_UNSUCCESSFUL,
torture_comment(torture, "RPC-HANDLE-RANDOM-ASSOC\n");
torture_comment(torture, "connect samr pipe1\n");
- status = torture_rpc_connection(mem_ctx, &p1, &dcerpc_table_samr);
+ status = torture_rpc_connection(mem_ctx, &p1, &ndr_table_samr);
torture_assert_ntstatus_ok(torture, status, "opening samr pipe1");
transport = p1->conn->transport.transport,
torture_comment(torture, "pip1 use assoc_group_id[0x%08X]\n", assoc_group_id);
torture_comment(torture, "connect samr pipe2 with assoc_group_id[0x%08X]- should fail\n", ++assoc_group_id);
- status = torture_rpc_connection_transport(mem_ctx, &p2, &dcerpc_table_samr,
+ status = torture_rpc_connection_transport(mem_ctx, &p2, &ndr_table_samr,
transport,
assoc_group_id);
torture_assert_ntstatus_equal(torture, status, NT_STATUS_UNSUCCESSFUL,
"opening samr pipe2");
torture_comment(torture, "connect samr pipe3 with assoc_group_id[0x%08X]- should fail\n", ++assoc_group_id);
- status = torture_rpc_connection_transport(mem_ctx, &p3, &dcerpc_table_samr,
+ status = torture_rpc_connection_transport(mem_ctx, &p3, &ndr_table_samr,
transport,
assoc_group_id);
torture_assert_ntstatus_equal(torture, status, NT_STATUS_UNSUCCESSFUL,
torture_comment(torture, "RPC-HANDLE-DRSUAPI\n");
- status = torture_rpc_connection(mem_ctx, &p1, &dcerpc_table_drsuapi);
+ status = torture_rpc_connection(mem_ctx, &p1, &ndr_table_drsuapi);
torture_assert_ntstatus_ok(torture, status, "opening drsuapi pipe1");
- status = torture_rpc_connection(mem_ctx, &p2, &dcerpc_table_drsuapi);
+ status = torture_rpc_connection(mem_ctx, &p2, &ndr_table_drsuapi);
torture_assert_ntstatus_ok(torture, status, "opening drsuapi pipe1");
GUID_from_string(DRSUAPI_DS_BIND_GUID, &bind_guid);
mem_ctx = talloc_init("torture_rpc_initshutdown");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_initshutdown);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_initshutdown);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
mem_ctx = talloc_init("torture_rpc_lsa");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_lsarpc);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
mem_ctx = talloc_init("torture_rpc_lsa_get_user");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_lsarpc);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
mem_ctx = talloc_init("torture_rpc_lsa");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_lsarpc);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
ret = False;
goto done;
lp_set_cmdline("torture:binding", dcerpc_binding_string(loop_ctx, b));
- status = torture_rpc_connection(loop_ctx, &p, &dcerpc_table_mgmt);
+ status = torture_rpc_connection(loop_ctx, &p, &ndr_table_mgmt);
if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
printf("Interface not available - skipping\n");
talloc_free(loop_ctx);
return False;
}
- status = dcerpc_bind_auth_none(p2, &dcerpc_table_lsarpc);
+ status = dcerpc_bind_auth_none(p2, &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to create bind on secondary connection\n");
return False;
machine_password = cli_credentials_get_password(machine_credentials);
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_netlogon);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_netlogon);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
status = torture_rpc_connection(mem_ctx,
&premact,
- &dcerpc_table_IRemoteActivation);
+ &ndr_table_IRemoteActivation);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_IOXIDResolver);
+ &ndr_table_IOXIDResolver);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_IRemoteActivation);
+ &ndr_table_IRemoteActivation);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_rot);
+ &ndr_table_rot);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
dcerpc_init();
- dcerpc_table_init();
+ ndr_table_init();
torture_suite_add_simple_test(suite, "LSA", torture_rpc_lsa);
torture_suite_add_simple_test(suite, "LSALOOKUP", torture_rpc_lsa_lookup);
goto done;
}
- status = dcerpc_bind_auth_none(lsa_pipe, &dcerpc_table_lsarpc);
+ status = dcerpc_bind_auth_none(lsa_pipe, &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
d_printf("dcerpc_bind_auth_none failed: %s\n",
nt_errstr(status));
goto done;
}
- status = dcerpc_bind_auth(lsa_pipe, &dcerpc_table_lsarpc,
+ status = dcerpc_bind_auth(lsa_pipe, &ndr_table_lsarpc,
credentials, auth_type, auth_level,
NULL);
if (!NT_STATUS_IS_OK(status)) {
}
if (admin_creds != NULL) {
- status = dcerpc_bind_auth(samr_pipe, &dcerpc_table_samr,
+ status = dcerpc_bind_auth(samr_pipe, &ndr_table_samr,
admin_creds, auth_type, auth_level,
NULL);
if (!NT_STATUS_IS_OK(status)) {
}
} else {
/* We must have an authenticated SMB connection */
- status = dcerpc_bind_auth_none(samr_pipe, &dcerpc_table_samr);
+ status = dcerpc_bind_auth_none(samr_pipe, &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
d_printf("dcerpc_bind_auth_none failed: %s\n",
nt_errstr(status));
goto done;
}
- status = dcerpc_bind_auth_none(net_pipe, &dcerpc_table_netlogon);
+ status = dcerpc_bind_auth_none(net_pipe, &ndr_table_netlogon);
if (!NT_STATUS_IS_OK(status)) {
d_printf("dcerpc_bind_auth_none failed: %s\n",
nt_errstr(status));
#endif
#if 1
net_pipe->conn->flags |= (DCERPC_SIGN | DCERPC_SEAL);
- status = dcerpc_bind_auth(net_pipe, &dcerpc_table_netlogon,
+ status = dcerpc_bind_auth(net_pipe, &ndr_table_netlogon,
wks_creds, DCERPC_AUTH_TYPE_SCHANNEL,
DCERPC_AUTH_LEVEL_PRIVACY,
NULL);
#else
- status = dcerpc_bind_auth_none(net_pipe, &dcerpc_table_netlogon);
+ status = dcerpc_bind_auth_none(net_pipe, &ndr_table_netlogon);
#endif
if (!NT_STATUS_IS_OK(status)) {
d_printf("schannel bind failed: %s\n", nt_errstr(status));
struct dom_sid *result;
status = pipe_bind_smb(mem_ctx, tree, "\\pipe\\lsarpc",
- &dcerpc_table_lsarpc, &lsa);
+ &ndr_table_lsarpc, &lsa);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) Could not bind to LSA: %s\n",
__location__, nt_errstr(status));
}
status = pipe_bind_smb(mem_ctx, cli->tree, "\\pipe\\srvsvc",
- &dcerpc_table_srvsvc, &p);
+ &ndr_table_srvsvc, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) could not bind to srvsvc pipe: %s\n",
__location__, nt_errstr(status));
}
status = pipe_bind_smb(mem_ctx, tree, "\\pipe\\srvsvc",
- &dcerpc_table_srvsvc, &p);
+ &ndr_table_srvsvc, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) could not bind to srvsvc pipe: %s\n",
__location__, nt_errstr(status));
}
status = pipe_bind_smb(mem_ctx, tree, "\\pipe\\srvsvc",
- &dcerpc_table_srvsvc, &p);
+ &ndr_table_srvsvc, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) could not bind to srvsvc pipe: %s\n",
__location__, nt_errstr(status));
}
status = pipe_bind_smb(mem_ctx, cli->tree, "\\lsarpc",
- &dcerpc_table_lsarpc, &p);
+ &ndr_table_lsarpc, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) pipe_bind_smb failed: %s\n", __location__,
nt_errstr(status));
return NT_STATUS_NO_MEMORY;
}
- status = pipe_bind_smb(mem_ctx, tree, "\\srvsvc", &dcerpc_table_srvsvc,
+ status = pipe_bind_smb(mem_ctx, tree, "\\srvsvc", &ndr_table_srvsvc,
&p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("could not bind to srvsvc pipe\n");
}
status = pipe_bind_smb(mem_ctx, cli->tree, "\\spoolss",
- &dcerpc_table_spoolss, &p);
+ &ndr_table_spoolss, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) pipe_bind_smb failed: %s\n", __location__,
nt_errstr(status));
}
status = pipe_bind_smb(mem_ctx, cli->tree, "\\wkssvc",
- &dcerpc_table_wkssvc, &p);
+ &ndr_table_wkssvc, &p);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) pipe_bind_smb failed: %s\n", __location__,
nt_errstr(status));
mem_ctx = talloc_init("torture_rpc_winreg");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_winreg);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_winreg);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
b->flags |= DCERPC_SCHANNEL | DCERPC_SIGN | DCERPC_SCHANNEL_128;
status = dcerpc_pipe_connect_b(mem_ctx, &p, b,
- &dcerpc_table_netlogon,
+ &ndr_table_netlogon,
machine_credentials, NULL);
if (!NT_STATUS_IS_OK(status)) {
BOOL ret = True;
struct policy_handle handle;
- status = torture_rpc_connection(torture, &p, &dcerpc_table_samr);
+ status = torture_rpc_connection(torture, &p, &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
return False;
}
BOOL ret = True;
struct policy_handle handle;
- status = torture_rpc_connection(torture, &p, &dcerpc_table_samr);
+ status = torture_rpc_connection(torture, &p, &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
return False;
}
BOOL ret = True;
struct policy_handle handle;
- status = torture_rpc_connection(torture, &p, &dcerpc_table_samr);
+ status = torture_rpc_connection(torture, &p, &ndr_table_samr);
if (!NT_STATUS_IS_OK(status)) {
return False;
}
status = torture_rpc_connection(samsync_state,
&samsync_state->p_lsa,
- &dcerpc_table_lsarpc);
+ &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
ret = False;
status = dcerpc_pipe_connect_b(samsync_state,
&samsync_state->p, b,
- &dcerpc_table_netlogon,
+ &ndr_table_netlogon,
credentials, NULL);
if (!NT_STATUS_IS_OK(status)) {
status = dcerpc_pipe_connect_b(samsync_state,
&samsync_state->p_netlogon_wksta,
b_netlogon_wksta,
- &dcerpc_table_netlogon,
+ &ndr_table_netlogon,
credentials_wksta, NULL);
if (!NT_STATUS_IS_OK(status)) {
lp_set_cmdline("torture:binding", dcerpc_binding_string(mem_ctx, b));
- status = torture_rpc_connection(loop_ctx, &p, &dcerpc_table_mgmt);
+ status = torture_rpc_connection(loop_ctx, &p, &ndr_table_mgmt);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(loop_ctx);
ret = False;
b->flags &= ~DCERPC_AUTH_OPTIONS;
b->flags |= dcerpc_flags;
- status = dcerpc_pipe_connect_b(test_ctx, &p, b, &dcerpc_table_samr,
+ status = dcerpc_pipe_connect_b(test_ctx, &p, b, &ndr_table_samr,
credentials, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect with schannel: %s\n", nt_errstr(status));
* the second */
/* Swap the binding details from SAMR to NETLOGON */
- status = dcerpc_epm_map_binding(test_ctx, b, &dcerpc_table_netlogon, NULL);
+ status = dcerpc_epm_map_binding(test_ctx, b, &ndr_table_netlogon, NULL);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
}
goto failed;
}
- status = dcerpc_bind_auth(p_netlogon, &dcerpc_table_netlogon,
+ status = dcerpc_bind_auth(p_netlogon, &ndr_table_netlogon,
credentials, DCERPC_AUTH_TYPE_SCHANNEL,
dcerpc_auth_level(p->conn),
NULL);
}
/* Swap the binding details from SAMR to LSARPC */
- status = dcerpc_epm_map_binding(test_ctx, b, &dcerpc_table_lsarpc, NULL);
+ status = dcerpc_epm_map_binding(test_ctx, b, &ndr_table_lsarpc, NULL);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
}
goto failed;
}
- status = dcerpc_bind_auth(p_lsa, &dcerpc_table_lsarpc,
+ status = dcerpc_bind_auth(p_lsa, &ndr_table_lsarpc,
credentials, DCERPC_AUTH_TYPE_SCHANNEL,
dcerpc_auth_level(p->conn),
NULL);
b->flags &= ~DCERPC_AUTH_OPTIONS;
b->flags |= dcerpc_flags;
- status = dcerpc_pipe_connect_b(test_ctx, &p_samr2, b, &dcerpc_table_samr,
+ status = dcerpc_pipe_connect_b(test_ctx, &p_samr2, b, &ndr_table_samr,
credentials, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect with schannel: %s\n", nt_errstr(status));
}
/* Swap the binding details from SAMR to NETLOGON */
- status = dcerpc_epm_map_binding(test_ctx, b, &dcerpc_table_netlogon, NULL);
+ status = dcerpc_epm_map_binding(test_ctx, b, &ndr_table_netlogon, NULL);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
}
}
/* and now setup an SCHANNEL bind on netlogon */
- status = dcerpc_bind_auth(p_netlogon2, &dcerpc_table_netlogon,
+ status = dcerpc_bind_auth(p_netlogon2, &ndr_table_netlogon,
credentials, DCERPC_AUTH_TYPE_SCHANNEL,
dcerpc_auth_level(p_samr2->conn),
NULL);
/* We don't want schannel for this test */
b->flags &= ~DCERPC_AUTH_OPTIONS;
- status = dcerpc_pipe_connect_b(test_ctx, &p_netlogon3, b, &dcerpc_table_netlogon,
+ status = dcerpc_pipe_connect_b(test_ctx, &p_netlogon3, b, &ndr_table_netlogon,
credentials, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect without schannel: %s\n", nt_errstr(status));
b->flags |= dcerpc_flags;
printf("Opening first connection\n");
- status = dcerpc_pipe_connect_b(test_ctx, &p1, b, &dcerpc_table_netlogon,
+ status = dcerpc_pipe_connect_b(test_ctx, &p1, b, &ndr_table_netlogon,
credentials1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect with schannel: %s\n", nt_errstr(status));
}
printf("Opening second connection\n");
- status = dcerpc_pipe_connect_b(test_ctx, &p2, b, &dcerpc_table_netlogon,
+ status = dcerpc_pipe_connect_b(test_ctx, &p2, b, &ndr_table_netlogon,
credentials2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect with schannel: %s\n", nt_errstr(status));
status = torture_rpc_connection(mem_ctx,
&p,
- &dcerpc_table_lsarpc);
+ &ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
return False;
}
- status = dcerpc_bind_auth_none(p2, &dcerpc_table_spoolss);
+ status = dcerpc_bind_auth_none(p2, &ndr_table_spoolss);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to create bind on secondary connection\n");
talloc_free(p2);
mem_ctx = talloc_init("torture_rpc_spoolss");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_spoolss);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_spoolss);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
mem_ctx = talloc_init("torture_rpc_srvsvc");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_srvsvc);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_srvsvc);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
ret &= test_NetShareAddSetDel(p, mem_ctx);
ret &= test_NetNameValidate(p, mem_ctx);
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_srvsvc);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_srvsvc);
if (!binding) {
d_printf("You must specify a ncacn binding string\n");
anon_credentials = cli_credentials_init_anon(mem_ctx);
status = dcerpc_pipe_connect(mem_ctx,
- &p, binding, &dcerpc_table_srvsvc,
+ &p, binding, &ndr_table_srvsvc,
anon_credentials, NULL);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
mem_ctx = talloc_init("torture_rpc_svcctl");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_svcctl);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_svcctl);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
status = dcerpc_pipe_connect(join,
&join->p,
dc_binding,
- &dcerpc_table_samr,
+ &ndr_table_samr,
cmdline_credentials, NULL);
} else {
status = torture_rpc_connection(join,
&join->p,
- &dcerpc_table_samr);
+ &ndr_table_samr);
}
if (!NT_STATUS_IS_OK(status)) {
return NULL;
suite = torture_suite_create(talloc_autofree_context(), "UNIXINFO");
tcase = torture_suite_add_rpc_iface_tcase(suite, "unixinfo",
- &dcerpc_table_unixinfo);
+ &ndr_table_unixinfo);
torture_rpc_tcase_add_test(tcase, "sidtouid", test_sidtouid);
torture_rpc_tcase_add_test(tcase, "uidtosid", test_uidtosid);
int i;
mem_ctx = talloc_init("torture_rpc_winreg");
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_winreg);
+ status = torture_rpc_connection(mem_ctx, &p, &ndr_table_winreg);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
suite = torture_suite_create(talloc_autofree_context(), "WKSSVC");
tcase = torture_suite_add_rpc_iface_tcase(suite, "wkssvc",
- &dcerpc_table_wkssvc);
+ &ndr_table_wkssvc);
torture_rpc_tcase_add_test(tcase, "NetWkstaGetInfo", test_NetWkstaGetInfo);
torture_rpc_tcase_add_test(tcase, "NetWkstaTransportEnum",
secured with SPNEGO, NTLMSSP or SCHANNEL */
ctx = dcerpc_secondary_auth_connection_send(domain->netlogon_pipe,
domain->samr_binding,
- &dcerpc_table_samr,
+ &ndr_table_samr,
domain->libnet_ctx->cred);
composite_continue(state->ctx, ctx, connect_samr_recv_pipe, state);
return result;
cli_credentials_set_machine_account(state->domain->libnet_ctx->cred);
if (!NT_STATUS_IS_OK(state->ctx->status)) goto failed;
- state->domain->netlogon_binding = init_domain_binding(state, &dcerpc_table_netlogon);
+ state->domain->netlogon_binding = init_domain_binding(state, &ndr_table_netlogon);
state->domain->netlogon_pipe = NULL;
/* No encryption on anonymous pipes */
ctx = dcerpc_pipe_connect_b_send(state, state->domain->netlogon_binding,
- &dcerpc_table_netlogon,
+ &ndr_table_netlogon,
state->domain->libnet_ctx->cred,
service->task->event_ctx);
}
talloc_steal(state->domain->netlogon_pipe, state->domain->netlogon_binding);
- state->domain->lsa_binding = init_domain_binding(state, &dcerpc_table_lsarpc);
+ state->domain->lsa_binding = init_domain_binding(state, &ndr_table_lsarpc);
/* For debugging, it can be a real pain if all the traffic is encrypted */
if (lp_winbind_sealed_pipes()) {
secured with SPNEGO or NTLMSSP */
ctx = dcerpc_secondary_auth_connection_send(state->domain->netlogon_pipe,
state->domain->lsa_binding,
- &dcerpc_table_lsarpc,
+ &ndr_table_lsarpc,
state->domain->libnet_ctx->cred
);
composite_continue(state->ctx, ctx, init_domain_recv_lsa_pipe, state);
&state->domain->libnet_ctx->lsa.pipe);
if (NT_STATUS_EQUAL(state->ctx->status, NT_STATUS_LOGON_FAILURE)) {
if (retry_with_schannel(state, state->domain->lsa_binding,
- &dcerpc_table_lsarpc,
+ &ndr_table_lsarpc,
init_domain_recv_lsa_pipe)) {
return;
}
if ((!NT_STATUS_IS_OK(state->ctx->status)
|| !NT_STATUS_IS_OK(state->lsa_openpolicy.out.result))) {
if (retry_with_schannel(state, state->domain->lsa_binding,
- &dcerpc_table_lsarpc,
+ &ndr_table_lsarpc,
init_domain_recv_lsa_pipe)) {
return;
}
return;
}
- state->domain->samr_binding = init_domain_binding(state, &dcerpc_table_samr);
+ state->domain->samr_binding = init_domain_binding(state, &ndr_table_samr);
/* We want to use the same flags as the LSA pipe did (so, if
* it needed schannel, then we need that here too) */