diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-09-07 15:29:32 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-09-08 03:35:27 +0200 |
commit | 1c25f5ebca7eb4e8a6ce95b1adf6088d67aecb94 (patch) | |
tree | 27215407729dbbceef70631d96e64191ab7b6e14 /COPYING | |
parent | 6e25723c82eced9eff8c06bd645b754008824370 (diff) | |
download | samba-1c25f5ebca7eb4e8a6ce95b1adf6088d67aecb94.tar.gz samba-1c25f5ebca7eb4e8a6ce95b1adf6088d67aecb94.tar.bz2 samba-1c25f5ebca7eb4e8a6ce95b1adf6088d67aecb94.zip |
libndr: moved the NDR_* flags to have less overlap
We have 3 different types of flags values in our NDR layer. We've
recently found bugs where these types of flags have been mixed up,
especially by people adding hand written ndr code for tricky
structures. We previously got away with this because (for example)
NDR_SCALARS and NDR_IN had the same value, so mixing up the two
concepts sometimes worked. Unfortunately it also led to bugs where we
didn't do what was expected, such as in our smbtorture ndr test suite,
where passing a ndr_flags value of zero led to only checking that two
empty structures were equal.
This changes the values of the NDR_IN|NDR_OUT and
NDR_SCALARS|NDR_BUFFERS values to be in different bit ranges, and adds
macros for checking the validity of passed in flags. A followup patch
modifies the ndr calls to use these macros, and pidl to generate
them. This should catch misuse of the APIs.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions