struct tevent_req *req = NULL, *subreq = NULL;
struct rpc_pipe_open_np_state *state = NULL;
struct rpc_pipe_client *result = NULL;
+ const char *pipe_name = NULL;
req = tevent_req_create(
mem_ctx, &state, struct rpc_pipe_open_np_state);
result->max_xmit_frag = RPC_MAX_PDU_FRAG_LEN;
- subreq = rpc_transport_np_init_send(state, ev, cli, table);
+ pipe_name = dcerpc_default_transport_endpoint(state,
+ NCACN_NP,
+ table);
+ if (tevent_req_nomem(pipe_name, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ subreq = rpc_transport_np_init_send(state, ev, cli, pipe_name);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
struct tevent_req *rpc_transport_np_init_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct cli_state *cli,
- const struct ndr_interface_table *table);
+ const char *pipe_name);
NTSTATUS rpc_transport_np_init_recv(struct tevent_req *req,
TALLOC_CTX *mem_ctx,
struct rpc_cli_transport **presult);
struct tevent_req *rpc_transport_np_init_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct cli_state *cli,
- const struct ndr_interface_table *table)
+ const char *pipe_name)
{
struct tevent_req *req;
struct rpc_transport_np_init_state *state;
state->conn = cli->conn;
state->timeout = cli->timeout;
state->abs_timeout = timeval_current_ofs_msec(cli->timeout);
- state->pipe_name = dcerpc_default_transport_endpoint(state, NCACN_NP,
- table);
+ state->pipe_name = talloc_strdup(state, pipe_name);
if (tevent_req_nomem(state->pipe_name, req)) {
return tevent_req_post(req, ev);
}
}
static NTSTATUS wsp_rpc_transport_np_connect(struct cli_state *cli,
- const struct ndr_interface_table *table,
TALLOC_CTX *mem_ctx,
struct rpc_cli_transport **presult)
{
if (ev == NULL) {
goto fail;
}
- req = rpc_transport_np_init_send(ev, ev, cli, table);
+ req = rpc_transport_np_init_send(ev, ev, cli, "MsFteWds");
if (req == NULL) {
goto fail;
}
}
status = wsp_rpc_transport_np_connect(cli,
- &ndr_table_msftewds,
cli,
&transport);
if (!NT_STATUS_IS_OK(status)) {