mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:librpc: remove bigendian argument from dcerpc_pull_ncacn_packet()
We should get this from the packet itself. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
3c6781ee4e
commit
1bfba2c516
@ -61,8 +61,7 @@ NTSTATUS dcerpc_push_ncacn_packet(TALLOC_CTX *mem_ctx,
|
||||
DATA_BLOB *blob);
|
||||
NTSTATUS dcerpc_pull_ncacn_packet(TALLOC_CTX *mem_ctx,
|
||||
const DATA_BLOB *blob,
|
||||
struct ncacn_packet *r,
|
||||
bool bigendian);
|
||||
struct ncacn_packet *r);
|
||||
NTSTATUS dcerpc_push_dcerpc_auth(TALLOC_CTX *mem_ctx,
|
||||
enum dcerpc_AuthType auth_type,
|
||||
enum dcerpc_AuthLevel auth_level,
|
||||
|
@ -88,14 +88,12 @@ NTSTATUS dcerpc_push_ncacn_packet(TALLOC_CTX *mem_ctx,
|
||||
* elements
|
||||
* @param blob The blob of data to decode
|
||||
* @param r An empty ncacn_packet, must not be NULL
|
||||
* @param bigendian Whether the packet is bignedian encoded
|
||||
*
|
||||
* @return a NTSTATUS error code
|
||||
*/
|
||||
NTSTATUS dcerpc_pull_ncacn_packet(TALLOC_CTX *mem_ctx,
|
||||
const DATA_BLOB *blob,
|
||||
struct ncacn_packet *r,
|
||||
bool bigendian)
|
||||
struct ncacn_packet *r)
|
||||
{
|
||||
enum ndr_err_code ndr_err;
|
||||
struct ndr_pull *ndr;
|
||||
@ -104,11 +102,12 @@ NTSTATUS dcerpc_pull_ncacn_packet(TALLOC_CTX *mem_ctx,
|
||||
if (!ndr) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
if (bigendian) {
|
||||
|
||||
if (!(CVAL(ndr->data, DCERPC_DREP_OFFSET) & DCERPC_DREP_LE)) {
|
||||
ndr->flags |= LIBNDR_FLAG_BIGENDIAN;
|
||||
}
|
||||
|
||||
if (CVAL(blob->data, DCERPC_PFC_OFFSET) & DCERPC_PFC_FLAG_OBJECT_UUID) {
|
||||
if (CVAL(ndr->data, DCERPC_PFC_OFFSET) & DCERPC_PFC_FLAG_OBJECT_UUID) {
|
||||
ndr->flags |= LIBNDR_FLAG_OBJECT_PRESENT;
|
||||
}
|
||||
|
||||
|
@ -948,8 +948,7 @@ static void rpc_api_pipe_got_pdu(struct tevent_req *subreq)
|
||||
|
||||
status = dcerpc_pull_ncacn_packet(state->pkt,
|
||||
&state->incoming_frag,
|
||||
state->pkt,
|
||||
!state->endianess);
|
||||
state->pkt);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
/*
|
||||
* TODO: do a real async disconnect ...
|
||||
|
Loading…
Reference in New Issue
Block a user