summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-09-10 08:46:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:02 -0500
commit0559bae27722a6eb48e3c94cddaa80649193d431 (patch)
treecb7ffd62f4a0bb8608a702ba7ed49191c0758cbd /source4
parent759e8162399a764cea40e4fffa5ba776f9af4807 (diff)
downloadsamba-0559bae27722a6eb48e3c94cddaa80649193d431.tar.gz
samba-0559bae27722a6eb48e3c94cddaa80649193d431.tar.bz2
samba-0559bae27722a6eb48e3c94cddaa80649193d431.zip
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)
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/ndr/ndr.c6
1 files changed, 6 insertions, 0 deletions
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;
}