From 0559bae27722a6eb48e3c94cddaa80649193d431 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 10 Sep 2005 08:46:28 +0000 Subject: r10141: if some of the LIBNDR_ALIGN_* flags and LIBNDR_FLAG_REMAINING are set, ndr_pull_data_blob() doesn't work correct. so make them exclute each other. jelmer, tridge: does that look correct? it fixes a problem, abartlet had with krb5pac.idl, where the align flags are inherited from the parent, and we want to get the [flag(NDR_REMAINING)] DATA_BLOB signature; metze (This used to be commit b9ea3e8f9f85098b63081bf12e2be65687921874) --- source4/librpc/ndr/ndr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index 6bc4198de1..2e6fd5b432 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -246,6 +246,12 @@ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags) if (new_flags & LIBNDR_FLAG_BIGENDIAN) { (*pflags) &= ~LIBNDR_FLAG_LITTLE_ENDIAN; } + if (new_flags & LIBNDR_FLAG_REMAINING) { + (*pflags) &= ~LIBNDR_ALIGN_FLAGS; + } + if (new_flags & LIBNDR_ALIGN_FLAGS) { + (*pflags) &= ~LIBNDR_FLAG_REMAINING; + } (*pflags) |= new_flags; } -- cgit