diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-02-23 11:00:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:48 -0500 |
commit | 1b17d9a587bf3600d449c2481fe1191793479e32 (patch) | |
tree | 56b754f86be6e0facbabc8e41f6fdf1c8232fac9 /source4/librpc/rpc/dcerpc.c | |
parent | deea9258536b15d5212db4a72b07fe747442b8f1 (diff) | |
download | samba-1b17d9a587bf3600d449c2481fe1191793479e32.tar.gz samba-1b17d9a587bf3600d449c2481fe1191793479e32.tar.bz2 samba-1b17d9a587bf3600d449c2481fe1191793479e32.zip |
r21515: add some more PFC_FLAGS from the DCERPC spec, and fix some names
also make it possible to pass and get the assoc_group_id for
a pipe.
also make it possible to pass the DCERPC_PFC_FLAG_CONC_MPX flag
in bind requests. From the spec it triggers support for
concurrent multiplexing on a single connection.
w2k3 uses the assoc_group_id feature when it becomes a domain controller
of an existing domain. Know the ugly part, with this it's possible to
use a policy handle from one connection on a different one...
typically the DsBind() call is on the 1st connection while DsGetNCChanges()
call using the first connections bind handle are on the 2nd connection.
The second connection also has the DCERPC_PFC_FLAG_CONC_MPX flag attached,
but that doesn't seem to be related to the cross connection handle usage
Can anyone think of a nice way to implement the assoc_group_id stuff in our server?
metze
(This used to be commit 2d8c85397d9027485ed6dbdcca87cc1ec84c7b76)
Diffstat (limited to 'source4/librpc/rpc/dcerpc.c')
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 288f65e027..0a7417a13f 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -346,7 +346,7 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c, ndr->flags |= LIBNDR_FLAG_BIGENDIAN; } - if (pkt->pfc_flags & DCERPC_PFC_FLAG_ORPC) { + if (pkt->pfc_flags & DCERPC_PFC_FLAG_OBJECT_UUID) { ndr->flags |= LIBNDR_FLAG_OBJECT_PRESENT; } @@ -625,6 +625,8 @@ static void dcerpc_bind_recv_handler(struct rpc_request *req, if (!composite_is_ok(c)) return; } + req->p->assoc_group_id = pkt->u.bind_ack.assoc_group_id; + composite_done(c); } @@ -648,7 +650,6 @@ static void dcerpc_timeout_handler(struct event_context *ev, struct timed_event } } - /* send a async dcerpc bind request */ @@ -677,9 +678,13 @@ struct composite_context *dcerpc_bind_send(struct dcerpc_pipe *p, pkt.call_id = p->conn->call_id; pkt.auth_length = 0; + if (p->binding->flags & DCERPC_CONCURRENT_MULTIPLEX) { + pkt.pfc_flags |= DCERPC_PFC_FLAG_CONC_MPX; + } + pkt.u.bind.max_xmit_frag = 5840; pkt.u.bind.max_recv_frag = 5840; - pkt.u.bind.assoc_group_id = 0; + pkt.u.bind.assoc_group_id = p->binding->assoc_group_id; pkt.u.bind.num_contexts = 1; pkt.u.bind.ctx_list = talloc_array(mem_ctx, struct dcerpc_ctx_list, 1); if (composite_nomem(pkt.u.bind.ctx_list, c)) return c; @@ -1004,7 +1009,7 @@ static void dcerpc_ship_next_request(struct dcerpc_connection *c) if (req->object) { pkt.u.request.object.object = *req->object; - pkt.pfc_flags |= DCERPC_PFC_FLAG_ORPC; + pkt.pfc_flags |= DCERPC_PFC_FLAG_OBJECT_UUID; chunk_size -= ndr_size_GUID(req->object,0); } @@ -1547,9 +1552,13 @@ struct composite_context *dcerpc_alter_context_send(struct dcerpc_pipe *p, pkt.call_id = p->conn->call_id; pkt.auth_length = 0; + if (p->binding->flags & DCERPC_CONCURRENT_MULTIPLEX) { + pkt.pfc_flags |= DCERPC_PFC_FLAG_CONC_MPX; + } + pkt.u.alter.max_xmit_frag = 5840; pkt.u.alter.max_recv_frag = 5840; - pkt.u.alter.assoc_group_id = 0; + pkt.u.alter.assoc_group_id = p->binding->assoc_group_id; pkt.u.alter.num_contexts = 1; pkt.u.alter.ctx_list = talloc_array(c, struct dcerpc_ctx_list, 1); if (composite_nomem(pkt.u.alter.ctx_list, c)) return c; |