summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-09-07 20:39:20 +0200
committerStefan Metzmacher <metze@samba.org>2010-09-17 15:42:34 +0200
commitde6254d3d6ffdd2a562ec9224a8390810c28c0dd (patch)
treed8ee0c877d9b2ebd9f55bc06c246494f85e6d0b0 /source3
parent1a22b1b44df62931a35254d06d2fc638c996c5f7 (diff)
downloadsamba-de6254d3d6ffdd2a562ec9224a8390810c28c0dd.tar.gz
samba-de6254d3d6ffdd2a562ec9224a8390810c28c0dd.tar.bz2
samba-de6254d3d6ffdd2a562ec9224a8390810c28c0dd.zip
s3:rpc_client: allow DCERPC_PKT_AUTH3 via rpc_api_pipe_send/recv
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_pipe.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 1975d73e70..f3a099c826 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -704,6 +704,7 @@ struct rpc_api_pipe_state {
static void rpc_api_pipe_trans_done(struct tevent_req *subreq);
static void rpc_api_pipe_got_pdu(struct tevent_req *subreq);
+static void rpc_api_pipe_auth3_done(struct tevent_req *subreq);
static struct tevent_req *rpc_api_pipe_send(TALLOC_CTX *mem_ctx,
struct event_context *ev,
@@ -738,6 +739,16 @@ static struct tevent_req *rpc_api_pipe_send(TALLOC_CTX *mem_ctx,
DEBUG(5,("rpc_api_pipe: %s\n", rpccli_pipe_txt(talloc_tos(), cli)));
+ if (state->expected_pkt_type == DCERPC_PKT_AUTH3) {
+ subreq = rpc_write_send(state, ev, cli->transport,
+ data->data, data->length);
+ if (subreq == NULL) {
+ goto fail;
+ }
+ tevent_req_set_callback(subreq, rpc_api_pipe_auth3_done, req);
+ return req;
+ }
+
/* get the header first, then fetch the rest once we have
* the frag_length available */
max_recv_frag = RPC_HEADER_LEN;
@@ -758,6 +769,23 @@ static struct tevent_req *rpc_api_pipe_send(TALLOC_CTX *mem_ctx,
return NULL;
}
+static void rpc_api_pipe_auth3_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req =
+ tevent_req_callback_data(subreq,
+ struct tevent_req);
+ NTSTATUS status;
+
+ status = rpc_write_recv(subreq);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ tevent_req_done(req);
+}
+
static void rpc_api_pipe_trans_done(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(