summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-18 13:40:44 +0100
committerKarolin Seeger <kseeger@samba.org>2010-02-22 15:50:37 +0100
commitdd467c0aefdfc23dcadbf85b1a7aad77c2ecaf86 (patch)
tree866e1ca3cddf18ceeab7f06f75439479b5ec7cd3
parentfdaeec990d69455dd12b7d3713d9957fd81daaf4 (diff)
downloadsamba-dd467c0aefdfc23dcadbf85b1a7aad77c2ecaf86.tar.gz
samba-dd467c0aefdfc23dcadbf85b1a7aad77c2ecaf86.tar.xz
samba-dd467c0aefdfc23dcadbf85b1a7aad77c2ecaf86.zip
libndr: for now align reverse relative pointers to 2 bytes by default.
This is just a hack and we should let the callers use FLAG_ALIGN2 explicit in future. metze (cherry picked from commit 4a76d29374769ba4c075b8d5767498848d2e17d6) (cherry picked from commit 00d97b0a06bd1c2d0cb6d15b5560f2850323c1a9)
-rw-r--r--librpc/ndr/ndr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index 05d6ccebb29..f1ff5971afc 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -1140,6 +1140,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, cons
/* the reversed offset is at the end of the main buffer */
correct_offset = ndr->relative_end_offset - len;
+ /* TODO: remove this hack and let the idl use FLAG_ALIGN2 explicit */
+ align = 2;
+
if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
align = 2;
} else if (ndr->flags & LIBNDR_FLAG_ALIGN4) {