summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-11-17 22:24:24 +0100
committerKarolin Seeger <kseeger@samba.org>2012-01-23 21:28:51 +0100
commit7ec243b526f85eb41a4bfaa083e878251119d2e3 (patch)
tree04704dbac57003dfe5a6ae2160504a67126ac877 /libcli
parenta72e1fa3a4c0c1cdf793b9221d1a60af6087690c (diff)
downloadsamba-7ec243b526f85eb41a4bfaa083e878251119d2e3.tar.gz
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. (cherry picked from commit 6cb605364e83fe0c5562c9b0920408c697e4fc3e)
Diffstat (limited to 'libcli')
-rw-r--r--libcli/netlogon/ndr_netlogon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcli/netlogon/ndr_netlogon.c b/libcli/netlogon/ndr_netlogon.c
index 7d6aa974b0c..81dbed4f7c7 100644
--- a/libcli/netlogon/ndr_netlogon.c
+++ b/libcli/netlogon/ndr_netlogon.c
@@ -53,6 +53,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;
@@ -98,6 +99,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;