The Samba-Bugzilla – Attachment 12931 Details for
Bug 12581
smbclient fails on bad endianess when listing shares from Solaris kernel SMB server on SPARC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for v4-4-test
tmp44.diff.txt (text/plain), 2.96 KB, created by
Stefan Metzmacher
on 2017-02-15 05:44:24 UTC
(
hide
)
Description:
Patch for v4-4-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2017-02-15 05:44:24 UTC
Size:
2.96 KB
patch
obsolete
>From 35493fe89b7674c9c05932146059fe253fee22bb Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Wed, 28 Oct 2015 12:16:05 +0100 >Subject: [PATCH] s3:librpc: remove bigendian argument from > dcerpc_pull_ncacn_packet() >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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> >(cherry picked from commit 1bfba2c5161c0e27f8c27301f258360aedf1b018) >--- > source3/librpc/rpc/dcerpc.h | 3 +-- > source3/librpc/rpc/dcerpc_helpers.c | 9 ++++----- > source3/rpc_client/cli_pipe.c | 3 +-- > 3 files changed, 6 insertions(+), 9 deletions(-) > >diff --git a/source3/librpc/rpc/dcerpc.h b/source3/librpc/rpc/dcerpc.h >index 1838012..f58ef4c 100644 >--- a/source3/librpc/rpc/dcerpc.h >+++ b/source3/librpc/rpc/dcerpc.h >@@ -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, >diff --git a/source3/librpc/rpc/dcerpc_helpers.c b/source3/librpc/rpc/dcerpc_helpers.c >index aab43a1..11b445f 100644 >--- a/source3/librpc/rpc/dcerpc_helpers.c >+++ b/source3/librpc/rpc/dcerpc_helpers.c >@@ -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; > } > >diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c >index 97f4944..3b2eff5 100644 >--- a/source3/rpc_client/cli_pipe.c >+++ b/source3/rpc_client/cli_pipe.c >@@ -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 ... >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
gd
:
review+
Actions:
View
Attachments on
bug 12581
:
12930
| 12931