diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-05-02 10:07:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:42 -0500 |
commit | cac54feea80f512bf6b74185025cbe4cdade7702 (patch) | |
tree | 2c8676d3b72dd85761da95ee3c1a1031a0a3ee41 | |
parent | 78aa8f181469b24f7ad836c2b7b8629c33f9f6b0 (diff) | |
download | samba-cac54feea80f512bf6b74185025cbe4cdade7702.tar.gz samba-cac54feea80f512bf6b74185025cbe4cdade7702.tar.bz2 samba-cac54feea80f512bf6b74185025cbe4cdade7702.zip |
r445: fixed the bind_nak code
(This used to be commit f3799e7720e13e12b59168cf4afbf2dfe87868f7)
-rw-r--r-- | source4/rpc_server/dcerpc_server.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index 2d448f61de..844df37b0e 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -398,7 +398,7 @@ static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32 reason) struct dcesrv_call_reply *rep; NTSTATUS status; - /* setup a bind_ack */ + /* setup a bind_nak */ dcesrv_init_hdr(&pkt); pkt.auth_length = 0; pkt.call_id = call->pkt.call_id; @@ -420,6 +420,7 @@ static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32 reason) dcerpc_set_frag_length(&rep->data, rep->data.length); DLIST_ADD_END(call->replies, rep, struct dcesrv_call_reply *); + DLIST_ADD_END(call->conn->call_list, call, struct dcesrv_call_state *); return NT_STATUS_OK; } @@ -472,6 +473,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call) /* handle any authentication that is being requested */ if (!dcesrv_auth_bind(call)) { + /* TODO: work out the right reject code */ return dcesrv_bind_nak(call, 0); } @@ -562,6 +564,7 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call) void *r; NTSTATUS status; DATA_BLOB stub; + uint32 total_length; opnum = call->pkt.u.request.opnum; @@ -612,6 +615,8 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call) stub = ndr_push_blob(push); + total_length = stub.length; + do { uint32 length; struct dcesrv_call_reply *rep; @@ -635,7 +640,7 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call) pkt.call_id = call->pkt.call_id; pkt.ptype = DCERPC_PKT_RESPONSE; pkt.pfc_flags = 0; - if (!call->replies) { + if (stub.length == total_length) { pkt.pfc_flags |= DCERPC_PFC_FLAG_FIRST; } if (length == stub.length) { |