summaryrefslogtreecommitdiff
path: root/testsuite/libsmbclient
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-09-07 15:29:32 +1000
committerAndrew Tridgell <tridge@samba.org>2011-09-08 03:35:27 +0200
commit1c25f5ebca7eb4e8a6ce95b1adf6088d67aecb94 (patch)
tree27215407729dbbceef70631d96e64191ab7b6e14 /testsuite/libsmbclient
parent6e25723c82eced9eff8c06bd645b754008824370 (diff)
downloadsamba-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 'testsuite/libsmbclient')
0 files changed, 0 insertions, 0 deletions