pidl: Change PIDL to correctly use and validate python integer types
commit5206ccd002b015a16952d21bd2fa441ff2e39eab
authorAndrew Bartlett <abartlet@samba.org>
Sun, 26 Jul 2015 22:57:43 +0000 (27 10:57 +1200)
committerStefan Metzmacher <metze@samba.org>
Mon, 24 Aug 2015 21:46:22 +0000 (24 23:46 +0200)
tree63ad95023e305a9ee4fee464662e886fa3017918
parent3faa7dc5a7d39cfdfc908a51e38772fda801c1a3
pidl: Change PIDL to correctly use and validate python integer types

In particular, it is critical that we use unsigned integers of
sufficient size in python for unsigned C integers, and it is
critical that we check for overflow at both the python and C
level.

Otherwise, we may both represent and sort these incorrectly,
in particular when sorting attributeID values from DRSUAPI
which are represented as an signed enum in C and a uint32_t in IDL,
but which often has the high bit set (in schema extensions).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11429

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
pidl/lib/Parse/Pidl/Samba4/Python.pm