diff options
author | Tim Potter <tpot@samba.org> | 2004-09-23 03:26:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:06 -0500 |
commit | 46cbe76a2c8c60bf14df941b2fcf6b8c5cad10e5 (patch) | |
tree | e3cb34a788b2f7557f9356c18c2eb577f8580d11 /source4/scripting/swig/torture | |
parent | 54d33d5674720aaa93dff20b66e7ab27d9027677 (diff) | |
download | samba-46cbe76a2c8c60bf14df941b2fcf6b8c5cad10e5.tar.gz samba-46cbe76a2c8c60bf14df941b2fcf6b8c5cad10e5.tar.bz2 samba-46cbe76a2c8c60bf14df941b2fcf6b8c5cad10e5.zip |
r2559: Python ints can't hold the full range of uint32 values so store them
as Python longs.
Also allow shorter width integer types to be initialised from long values.
Their values are truncated if they are too long.
(This used to be commit e9eb231d6441774d1b5227962bbe94aa29e20995)
Diffstat (limited to 'source4/scripting/swig/torture')
-rwxr-xr-x | source4/scripting/swig/torture/samr.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/scripting/swig/torture/samr.py b/source4/scripting/swig/torture/samr.py index 68b065b677..e462087ca0 100755 --- a/source4/scripting/swig/torture/samr.py +++ b/source4/scripting/swig/torture/samr.py @@ -872,6 +872,16 @@ def test_EnumDomains(pipe, connect_handle): for domain in result['sam']['entries']: test_LookupDomain(pipe, handle, domain['name']['name']) +def test_LongInt(pipe): + + # Check that we can use long values for shorter width types + + r = {} + r['system_name'] = 0L; + r['access_mask'] = 0x02000000L + + result = dcerpc.samr_Connect(pipe, r) + # Parse command line parser = OptionParser() @@ -908,6 +918,8 @@ pipe = dcerpc.pipe_connect(binding, dcerpc.DCERPC_SAMR_UUID, dcerpc.DCERPC_SAMR_VERSION, domain, username, password) +test_LongInt(pipe) + handle = test_Connect(pipe) test_QuerySecurity(pipe, handle) |