1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-30 08:23:49 +03:00

r4618: - tidied up the alter_context client code a bit

- there is no alter_nak or alter_ack packet, its all done in an
  alter_response

- auto-allocated the contex_ids

- tried to fix up the dcom code to work again with
  alter_context. Jelmer, please take a look :)
This commit is contained in:
Andrew Tridgell
2005-01-09 11:32:12 +00:00
committed by Gerald (Jerry) Carter
parent 0129ec947a
commit dd1c54add8
11 changed files with 100 additions and 143 deletions

View File

@@ -580,22 +580,22 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call)
dcesrv_init_hdr(&pkt);
pkt.auth_length = 0;
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_ALTER_ACK;
pkt.ptype = DCERPC_PKT_ALTER_RESP;
pkt.pfc_flags = DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST;
pkt.u.alter_ack.max_xmit_frag = 0x2000;
pkt.u.alter_ack.max_recv_frag = 0x2000;
pkt.u.alter_ack.assoc_group_id = call->pkt.u.bind.assoc_group_id;
pkt.u.alter_ack.secondary_address = NULL;
pkt.u.alter_ack.num_results = 1;
pkt.u.alter_ack.ctx_list = talloc_p(call, struct dcerpc_ack_ctx);
if (!pkt.u.alter_ack.ctx_list) {
pkt.u.alter_resp.max_xmit_frag = 0x2000;
pkt.u.alter_resp.max_recv_frag = 0x2000;
pkt.u.alter_resp.assoc_group_id = call->pkt.u.bind.assoc_group_id;
pkt.u.alter_resp.secondary_address = NULL;
pkt.u.alter_resp.num_results = 1;
pkt.u.alter_resp.ctx_list = talloc_p(call, struct dcerpc_ack_ctx);
if (!pkt.u.alter_resp.ctx_list) {
return NT_STATUS_NO_MEMORY;
}
pkt.u.alter_ack.ctx_list[0].result = result;
pkt.u.alter_ack.ctx_list[0].reason = reason;
GUID_from_string(NDR_GUID, &pkt.u.alter_ack.ctx_list[0].syntax.uuid);
pkt.u.alter_ack.ctx_list[0].syntax.if_version = NDR_GUID_VERSION;
pkt.u.alter_ack.auth_info = data_blob(NULL, 0);
pkt.u.alter_resp.ctx_list[0].result = result;
pkt.u.alter_resp.ctx_list[0].reason = reason;
GUID_from_string(NDR_GUID, &pkt.u.alter_resp.ctx_list[0].syntax.uuid);
pkt.u.alter_resp.ctx_list[0].syntax.if_version = NDR_GUID_VERSION;
pkt.u.alter_resp.auth_info = data_blob(NULL, 0);
if (!dcesrv_auth_alter_ack(call, &pkt)) {
return dcesrv_bind_nak(call, 0);