From: Stefan Metzmacher Date: Thu, 9 Jan 2014 18:29:14 +0000 (+0100) Subject: STEP03c: HACK s3:rpc_client: rpc_pipe_bind => dcerpc_do_bind_send/recv X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=57d9b9292e90a98949be55c59698a163d35d5fc0 STEP03c: HACK s3:rpc_client: rpc_pipe_bind => dcerpc_do_bind_send/recv --- diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 0813ba1c9e21..9dff4250539e 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -2129,8 +2129,10 @@ NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli, { TALLOC_CTX *frame = talloc_stackframe(); struct tevent_context *ev; - struct tevent_req *req; NTSTATUS status = NT_STATUS_OK; + struct dcerpc_call *call; + struct tevent_req *subreq; + struct dcerpc_presentation *pres[1]; ev = samba_tevent_context_init(frame); if (ev == NULL) { @@ -2138,17 +2140,23 @@ NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli, goto fail; } - req = rpc_pipe_bind_send(frame, ev, cli, auth); - if (req == NULL) { + call = dcerpc_call_allocate(frame, cli->assoc, NULL, NULL); + + pres[0] = cli->pres; + + subreq = dcerpc_do_bind_send(frame, ev, cli->conn, call, + cli->sec, ARRAY_SIZE(pres), pres); + + if (subreq == NULL) { status = NT_STATUS_NO_MEMORY; goto fail; } - if (!tevent_req_poll_ntstatus(req, ev, &status)) { + if (!tevent_req_poll_ntstatus(subreq, ev, &status)) { goto fail; } - status = rpc_pipe_bind_recv(req); + status = dcerpc_do_bind_recv(subreq); fail: TALLOC_FREE(frame); return status;