From 64e08fef16001d62b43f6925a26ad739391cface Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 29 Sep 2009 17:47:54 +1000 Subject: pidl: added union padding for NDR64 This fixes the problem with samr UserInfo16 when NDR64 is enabled --- librpc/ndr/libndr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'librpc/ndr/libndr.h') diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h index 03b4362b37..f6f5170646 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -498,6 +498,8 @@ enum ndr_err_code ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n enum ndr_err_code ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n); enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size); enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size); +enum ndr_err_code ndr_push_union_align(struct ndr_push *ndr, size_t size); +enum ndr_err_code ndr_pull_union_align(struct ndr_pull *ndr, size_t size); enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n); enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n); enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n); -- cgit From 9eb78be4a670615b4e6a722f121f0f0e585b8d6b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 1 Oct 2009 16:08:02 +1000 Subject: ndr64: added support for trailing gap alignment NDR64 has a 'trailing gap' alignment, which aligns the end of a structure on the overall structure alignment. This explains the discrepancy we had with the RPC-SAMR test and NDR64 --- librpc/ndr/libndr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'librpc/ndr/libndr.h') diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h index f6f5170646..3236932ba7 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -500,6 +500,8 @@ enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size); enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size); enum ndr_err_code ndr_push_union_align(struct ndr_push *ndr, size_t size); enum ndr_err_code ndr_pull_union_align(struct ndr_pull *ndr, size_t size); +enum ndr_err_code ndr_push_trailer_align(struct ndr_push *ndr, size_t size); +enum ndr_err_code ndr_pull_trailer_align(struct ndr_pull *ndr, size_t size); enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n); enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n); enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n); -- cgit From 76feeb1b97b1d8f24650c5198e9c61c4f5b1357a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 5 Oct 2009 15:10:35 +0200 Subject: libndr: add int3264 ndr prototype. Guenther --- librpc/ndr/libndr.h | 1 + 1 file changed, 1 insertion(+) (limited to 'librpc/ndr/libndr.h') diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h index 3236932ba7..f4c649c415 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -470,6 +470,7 @@ NDR_SCALAR_PROTO(int16, int16_t) NDR_SCALAR_PROTO(uint32, uint32_t) NDR_SCALAR_PROTO(uint3264, uint32_t) NDR_SCALAR_PROTO(int32, int32_t) +NDR_SCALAR_PROTO(int3264, int32_t) NDR_SCALAR_PROTO(udlong, uint64_t) NDR_SCALAR_PROTO(udlongr, uint64_t) NDR_SCALAR_PROTO(dlong, int64_t) -- cgit From 2bf8a7485cf0733c808bc97a399a1c73bb988414 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 6 Oct 2009 20:47:09 +1100 Subject: pidl: get the alignment right for uint1632 enums (NDR64) The default enum in NDR63 is 32 bits, not 16 bits. We need a uint1632 type to get the alignment right. --- librpc/ndr/libndr.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'librpc/ndr/libndr.h') diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h index f4c649c415..45cb24405f 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -467,6 +467,7 @@ NDR_SCALAR_PROTO(uint8, uint8_t) NDR_SCALAR_PROTO(int8, int8_t) NDR_SCALAR_PROTO(uint16, uint16_t) NDR_SCALAR_PROTO(int16, int16_t) +NDR_SCALAR_PROTO(uint1632, uint16_t) NDR_SCALAR_PROTO(uint32, uint32_t) NDR_SCALAR_PROTO(uint3264, uint32_t) NDR_SCALAR_PROTO(int32, int32_t) @@ -549,8 +550,10 @@ struct GUID GUID_random(void); _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v); _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v); _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v); +_PUBLIC_ enum ndr_err_code ndr_pull_enum_uint1632(struct ndr_pull *ndr, int ndr_flags, uint16_t *v); _PUBLIC_ enum ndr_err_code ndr_push_enum_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v); _PUBLIC_ enum ndr_err_code ndr_push_enum_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v); _PUBLIC_ enum ndr_err_code ndr_push_enum_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v); +_PUBLIC_ enum ndr_err_code ndr_push_enum_uint1632(struct ndr_push *ndr, int ndr_flags, uint16_t v); #endif /* __LIBNDR_H__ */ -- cgit