summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-11-17 22:36:22 +0100
committerVolker Lendecke <vlendec@samba.org>2011-11-18 09:33:37 +0100
commit2642f385887fbd3aecd4286a4d6223a21d981714 (patch)
tree1d894d35df51e31bad51c895af426937d4042e75
parentcd3f552f4f632204edc8064a1ad332e703a28e72 (diff)
downloadsamba-2642f385887fbd3aecd4286a4d6223a21d981714.tar.gz
samba-2642f385887fbd3aecd4286a4d6223a21d981714.tar.bz2
samba-2642f385887fbd3aecd4286a4d6223a21d981714.zip
s3: Fix bug 8371
ndr_set_flag or's in the given flag (ALIGN4). At this point, ndr->flags contains NOALIGN, which will persist. In ndr_push_DATA_BLOB NOALIGN overrides everything else, so that the ALIGN4 is not respected. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Nov 18 09:33:37 CET 2011 on sn-devel-104
-rw-r--r--librpc/ndr/ndr_nbt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/librpc/ndr/ndr_nbt.c b/librpc/ndr/ndr_nbt.c
index f2a1ca3ba5..29013f0359 100644
--- a/librpc/ndr/ndr_nbt.c
+++ b/librpc/ndr/ndr_nbt.c
@@ -234,6 +234,7 @@ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_REQUEST(struct ndr_push *ndr, int
if (ndr_size_dom_sid0(&r->sid, ndr->flags)) {
struct ndr_push *_ndr_sid;
uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr->flags &= ~LIBNDR_FLAG_NOALIGN;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
ndr->flags = _flags_save_DATA_BLOB;
@@ -279,6 +280,7 @@ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_REQUEST(struct ndr_pull *ndr, int
if (r->sid_size) {
uint32_t _flags_save_DATA_BLOB = ndr->flags;
struct ndr_pull *_ndr_sid;
+ ndr->flags &= ~LIBNDR_FLAG_NOALIGN;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
ndr->flags = _flags_save_DATA_BLOB;