From 13e10b47fb65de32dcc9d54d42294564f8b39c74 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 19 Nov 2003 03:01:57 +0000 Subject: separate the reason and result codes in a bind_ack. This is needed for interop with the opengroup dcerpc code (This used to be commit 8d9061dcd097ed7eee8d9ec531db65b1df8ac8e6) --- source4/librpc/rpc/dcerpc.c | 3 ++- source4/librpc/rpc/dcerpc.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index aeeee092ce..bc5f38aa05 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -252,7 +252,8 @@ static NTSTATUS dcerpc_pull_bind_ack(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, NTSTATUS status; BLOB_CHECK_BOUNDS(blob, *offset, 24); - pkt->ctx_list[i].result = IVAL(blob->data, *offset); + pkt->ctx_list[i].result = SVAL(blob->data, *offset); + pkt->ctx_list[i].reason = SVAL(blob->data, 2 + *offset); (*offset) += 4; status = dcerpc_pull_syntax_id(blob, mem_ctx, offset, &pkt->ctx_list[i].syntax); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h index 81cefa1678..3f9241e9a3 100644 --- a/source4/librpc/rpc/dcerpc.h +++ b/source4/librpc/rpc/dcerpc.h @@ -108,7 +108,8 @@ struct dcerpc_packet { const char *secondary_address; uint8 num_results; struct { - uint32 result; + uint16 result; + uint16 reason; struct dcerpc_syntax_id syntax; } *ctx_list; DATA_BLOB auth_verifier; -- cgit