Tim Potter
8f00427136
r2994: More cleanups. Move the generation of NTSTATUS and WERROR exceptions
...
from inside a swig %exception block and into the argout typemap. This
will allow us to wrap functions that don't require exception handling, and
also get rid of some ugly code in dcerpc.i
(This used to be commit 558076cc8d
)
2007-10-10 12:59:55 -05:00
Tim Potter
dc2df2530f
r2986: Add correct value to dict when generating wrapper for functions that
...
return WERROR values.
Clean up WERROR vs NTSTATUS handling a bit.
(This used to be commit e6756e3ee0
)
2007-10-10 12:59:54 -05:00
Tim Potter
acf657a7c2
r2975: Try to emulate NT_STATUS_IS_ERR() functionality for WERRORs. Unfortunately
...
this means enumerating all the ones we don't think are errors.
(This used to be commit a079e044f0
)
2007-10-10 12:59:53 -05:00
Tim Potter
1c4b87c788
r2966: Handle conversion of DATA_BLOB fields from Python in a slightly nicer
...
manner. I'm hoping to get rid of DATA_BLOB's but for the moment they
make it easy to get some spoolss action happening quickly.
(This used to be commit 15f8f73f8b
)
2007-10-10 12:59:52 -05:00
Tim Potter
e3627c2c6e
r2965: Ignore *.pyc files in torture directory.
...
Allow test module name to be specified on command line for pytorture
module.
Start spoolss torture test.
(This used to be commit 44bab84f76
)
2007-10-10 12:59:52 -05:00
Tim Potter
913d5df89e
r2964: Add spoolss to list of wrapped client functions.
...
(This used to be commit 96d31ff19d
)
2007-10-10 12:59:52 -05:00
Tim Potter
94ae449f33
r2817: Get winreg_GetKeySecurity() working but use data blob instead of
...
security descriptor.
(This used to be commit bc5165e40a
)
2007-10-10 12:59:36 -05:00
Tim Potter
263212aba5
r2807: OK I think winreg_EnumValue() finally works. The previous version
...
didn't work with non-NULL registry value names.
Update testsuite to enumerate all keys and values two levels deep.
(This used to be commit c09f0f355b
)
2007-10-10 12:59:36 -05:00
Tim Potter
985abd104d
r2801: Wrapped functions that return a DOS error code can return DCERPC
...
faults if they are badly formed. Handle this by checking the value of
NTSTATUS as well as WERROR.
(This used to be commit bb1be78197
)
2007-10-10 12:59:35 -05:00
Tim Potter
68d2ce3320
r2795: Split status code constants into a separate file.
...
(This used to be commit 12a3f75c1c
)
2007-10-10 12:59:34 -05:00
Tim Potter
a248164de5
r2790: Add code to generate WERROR exceptions. Arrange inclusion of autogenerated
...
interface files to divvy them up into pipes that return WERRORs and pipes
that return NTSTATUS values.
(This used to be commit 294d1ae35c
)
2007-10-10 12:59:34 -05:00
Tim Potter
710ad9613b
r2781: Got winreg_EnumValue() working. Check it in so I don't break it trying
...
to clean it up. (-:
(This used to be commit cc646f73b8
)
2007-10-10 12:59:32 -05:00
Tim Potter
7cef5fd077
r2780: Add conversion routines for DATA_BLOB. I'm not convinced that DATA_BLOB's
...
should be treated as scalar types though.
(This used to be commit c9e96038f8
)
2007-10-10 12:59:32 -05:00
Tim Potter
76a8fe491e
r2766: Test OpenKey, QueryInfoKey, EnumKey, CloseKey functions.
...
The IDL for EnumValue is wrong - can't figure it out right now.
(This used to be commit 37af942d08
)
2007-10-10 12:59:31 -05:00
Tim Potter
b11be587e0
r2765: Allow functions containing WERROR values to be compiled.
...
Add winreg.i to list of extensions.
(This used to be commit 6f3f6de058
)
2007-10-10 12:59:31 -05:00
Tim Potter
096d2d68de
r2739: Start of torture test for winreg wrappers.
...
(This used to be commit cf9b984b84
)
2007-10-10 12:59:29 -05:00
Tim Potter
83d0f6ffae
r2728: Break arg parsing stuff out of samr.py into a standalone program.
...
(This used to be commit 799b377bad
)
2007-10-10 12:59:27 -05:00
Tim Potter
5821c39553
r2560: Don't require structure fields that have the pidl value() property
...
to be set. They can be if you want, but will be overwritten by the
pidl push code.
(This used to be commit 3170f6ed84
)
2007-10-10 12:59:06 -05:00
Tim Potter
46cbe76a2c
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 e9eb231d64
)
2007-10-10 12:59:06 -05:00
Tim Potter
169627d7f5
r2555: Start of a rpcclient type program.
...
(This used to be commit c9d6827312
)
2007-10-10 12:59:05 -05:00
Tim Potter
15568d45e1
r2511: Add NT status codes.
...
(This used to be commit 471b13da2b
)
2007-10-10 12:59:00 -05:00
Tim Potter
c9d96e9c44
r2502: Finish off samr torture test: samr_CreateUser2, samr_SetUserInfo,
...
samr_QueryAliasInfo, samr_SetAliasInfo, samr_AddMemberToAlias,
samr_AddMultipleMembersToAlias, samr_QueryDisplayInfo,
samr_QueryDisplayInfo2, samr_QueryDisplayInfo3,
samr_GetDisplayEnumerationIndex, samr_GetDisplayEnumerationIndex2,
samr_TestPrivateFunctionsDomain, samr_RidToSid,
samr_GetBootKeyInformation, samr_DeleteUser, samr_DeleteAlias,
samr_Close.
(This used to be commit 808e0708a9
)
2007-10-10 12:58:59 -05:00
Tim Potter
b3a11c86e1
r2492: Some cleanups.
...
Add tests for samr_CreateDomainGroup, samr_DeleteDomainGroup,
samr_QueryDomainInfo, samr_SetDomainInfo, samr_EnumDomainUsers,
samr_EnumDomainAliases, samr_EnumDomainGroups.
(This used to be commit 991d783c1a
)
2007-10-10 12:58:57 -05:00
Tim Potter
99721cc7c8
r2490: Some changes to take into account non-error NTSTATUS codes being returned:
...
- Only throw an exception if NT_STATUS_IS_ERR() instead of
!NT_STATUS_IS_OK().
- Add the NTSTATUS value to the returned dictionary under a key of
'result' so calling functions can access it.
(This used to be commit 4ddcae90a2
)
2007-10-10 12:58:57 -05:00
Tim Potter
46efd4d31b
r2486: Use correct type checks when checking 64-bit quantities (int64, uint64,
...
NTTIME and HYPER_T).
Also use the correct conversion routines when creating 64 bit objects.
(This used to be commit f09fee9239
)
2007-10-10 12:58:57 -05:00
Tim Potter
851e54de66
r2461: Update samr.py torture test after policy handle parameter renames.
...
I thought of another exception to the policy name rule - samr_Close
can operate on any kind of samr handle.
(This used to be commit 632b7cc0d6
)
2007-10-10 12:58:55 -05:00
Tim Potter
67cb7c9451
r2429: Add tests for samr_QueryUserInfo(), samr_QueryUserInfo2(),
...
samr_GetUserPwInfo(), samr_TestPrivateFunctionsUser(). Add stubs for
the rest of the functions in test_OpenDomain() from smbtorture.
(This used to be commit 1dc86e466d
)
2007-10-10 12:58:51 -05:00
Tim Potter
b653d8775a
r2427: Add tests for samr_GetDomPwInfo, samr_RemoveMemberFromForeignDomain,
...
samr_LookupName, samr_OpenUser, samr_DeleteUser, samr_CreateUse and
samr_OpenDomain.
(This used to be commit 086740c178
)
2007-10-10 12:58:51 -05:00
Tim Potter
6d82eaa7e9
r2424: Refactor handling of non-OK NTSTATUS returns to be more swiggish.
...
(This used to be commit aaef6eaf6e
)
2007-10-10 12:58:51 -05:00
Tim Potter
cb3cacdf40
r2423: Add some instructions for building extensions.
...
(This used to be commit 7a7cf9f352
)
2007-10-10 12:58:51 -05:00
Tim Potter
fa8c1abcc8
r2421: Fix test for lookupdomain for a non-existent domain.
...
Export NTSTATUS exception from wrapper module so it can be used by scripts.
(This used to be commit 57edfd605b
)
2007-10-10 12:58:50 -05:00
Tim Potter
6feaf61b61
r2419: Write tests for samr_EnumDomains() and samr_LookupDomain().
...
(This used to be commit aa15fd1ecb
)
2007-10-10 12:58:50 -05:00
Tim Potter
6bc08531b2
r2416: More argument checks. Raise an exception instead of segfaulting if a
...
dictionary does not contain a required key.
(This used to be commit fc5443af9c
)
2007-10-10 12:58:50 -05:00
Tim Potter
d384984e35
r2415: Throw a TypeError exception if a scalar value doesn't have the correct
...
type, or the argument to a to_python function isn't a dictionary.
(This used to be commit 0f58ffb142
)
2007-10-10 12:58:50 -05:00
Tim Potter
a50931e728
r2414: samr_Connect.system_name is now an array.
...
(This used to be commit e1166c2100
)
2007-10-10 12:58:50 -05:00
Tim Potter
fba4af3a1b
r2410: Add test for samr_SetSecurity().
...
(This used to be commit e822979e84
)
2007-10-10 12:58:49 -05:00
Tim Potter
b02b2fa347
r2408: Tridge suggested that all the structures from misc.idl (policy handles,
...
sids, security descriptors and acls) can be automatically generated
instead of hand-written. Fix up the swig wrapper generator and helper
routines to do this. (Only works for policy handles right now though and
arrays are to be converted into lists instead of being binary blobs).
Fix up wrapper generation for modules that don't define an interface
(e.g misc.idl).
(This used to be commit 160dc90921
)
2007-10-10 12:58:49 -05:00
Tim Potter
d46b188560
r2359: More consistency fixes: pass a talloc context to every function that
...
doesn't convert scalar types, more renaming of function names.
Implement conversion fns for dom_sid, dom_sid2 (to struct version stubbed
out). Also from Python conversions for security_acl and security_descriptors.
(This used to be commit 945a468105
)
2007-10-10 12:58:46 -05:00
Tim Potter
aa60dc1630
r2358: More renaming of functions to keep things consistent.
...
(This used to be commit 84513e4ed1
)
2007-10-10 12:58:46 -05:00
Tim Potter
dabb37c547
r2357: Start coding conversion routines for security descriptors, acls and sids.
...
(This used to be commit c8d13a809b
)
2007-10-10 12:58:45 -05:00
Tim Potter
3791d88b87
r2345: Add test for samr_QuerySecurity()
...
(This used to be commit f6978a007a
)
2007-10-10 12:58:45 -05:00
Tim Potter
2cfd0b654c
r2344: Return PyDict_New() in stub functions instead of Py_None to avoid
...
crashing in garbage collector (hmm - all that was required was probably
a Py_INCREF(Py_None) though).
(This used to be commit a3eac318a6
)
2007-10-10 12:58:45 -05:00
Tim Potter
8d14c2a39f
r2342: Remove obsolete file.
...
(This used to be commit b7ef3d0a00
)
2007-10-10 12:58:45 -05:00
Andrew Tridgell
d97f808cb6
r2339: my first python commit!
...
added command line options for binding string, domain, username and password
(This used to be commit e94bec1079
)
2007-10-10 12:58:44 -05:00
Tim Potter
31288d6545
r2336: Add another conversion function to allow union arms that contain structures
...
not pointers to structures. Do some renaming of hand-written functions
as a result.
Include lsa interface before samr interface as samr depends on some lsa
structures.
Build up a nice hashed index of interfaces, functions, structs and
unions.
Add test for samr_Connect5() function which contains a union.
(This used to be commit 30f068164a
)
2007-10-10 12:58:44 -05:00
Tim Potter
12b29d8bb7
r2324: Add hand-written versions of functions from misc.idl.
...
(This used to be commit d6876701cc
)
2007-10-10 12:58:44 -05:00
Tim Potter
984e71e5e5
r2300: Start writing a Python torture test suite based on the smbtorture rpc tests.
...
(This used to be commit 73e087f11e
)
2007-10-10 12:58:41 -05:00
Tim Potter
a34ddd04ca
r2299: Map a (C) NULL pointer to (Python) None and vice versa.
...
(This used to be commit 05cff58070
)
2007-10-10 12:58:41 -05:00
Tim Potter
23492b3033
r2297: Add string conversion functions.
...
(This used to be commit cbfb177394
)
2007-10-10 12:58:40 -05:00
Tim Potter
4c017a9529
r2296: Correct setting of access_mask in test program.
...
(This used to be commit e4a5840ff8
)
2007-10-10 12:58:40 -05:00
Tim Potter
b5119cd662
r2295: Convert simple scalar types and policy handles between dcerpc function
...
call request and response structures.
(This used to be commit d31d23b944
)
2007-10-10 12:58:40 -05:00
Tim Potter
56d7b0dc8a
r2278: Add some more helper functions.
...
(This used to be commit 5a64449599
)
2007-10-10 12:58:38 -05:00
Tim Potter
91222c6029
r2276: Remove garbage collection debugs.
...
(This used to be commit b7ebafbbe0
)
2007-10-10 12:58:37 -05:00
Tim Potter
ec952cde05
r2256: Include autogenerated interfaces for lsa and samr pipes. Typemaps are currently
...
not working though.
(This used to be commit 55bd2dc02d
)
2007-10-10 12:58:35 -05:00
Tim Potter
3f7bf05f75
r2253: Add test program, as small example of what's going on.
...
(This used to be commit fd31ae38df
)
2007-10-10 12:58:35 -05:00
Tim Potter
915f2e539d
r2243: Include definition for PRINTF_ATTRIBUTE in Python tdb wrapper.
...
(This used to be commit 301bb069c3
)
2007-10-10 12:58:34 -05:00
Tim Potter
68aad436e6
r2236: Zero request structure to let the REF_ALLOC flag work its magic.
...
Add argout typemap which throws an exception if NTSTATUS != OK and
creates a dictionary of return values.
samr_Connect2 function now works!
(This used to be commit fdfabbd4a5
)
2007-10-10 12:58:33 -05:00
Tim Potter
0a3a76fe96
r2235: When creating exception data, use Py_BuildValue instead of doing it
...
all by hand.
Use $symname to name TALLOC_CTX's created in wrapper function. Also,
make sure to free context afterwards.
Set the DCERPC_NDR_REF_ALLOC flag in the dcerpc_pipe struct to save
use lots of initialisation.
(This used to be commit 5fead63618
)
2007-10-10 12:58:33 -05:00
Tim Potter
65b5a2297c
r2230: Wrapper for dcerpc_samr_Connect2(). All this glue code should be
...
automatically generated but at the moment it's hand coded.
(This used to be commit e1a368050d
)
2007-10-10 12:58:33 -05:00
Tim Potter
86bf5cefa9
r2229: Have dcerpc_pipe_connect() throw an exception if non-zero NTSTATUS is
...
returned from the C function. This way we can return the struct dcerpc_pipe
object instead of a tuple of (NTSTATUS, dcerpc_pipe) which is a bad
interface.
(This used to be commit a3a85bd419
)
2007-10-10 12:58:33 -05:00
Tim Potter
779b89cfc8
r2228: Finally commit bits of old workareas together to get dcerpc python
...
bindings happening. This commit lets python call dcerpc_pipe_connect()
and open the samr pipe.
(This used to be commit f5852bf3e2
)
2007-10-10 12:58:33 -05:00
Tim Potter
5230295b6b
r2227: Get rid of annoying compiler warning.
...
(This used to be commit 64f961f039
)
2007-10-10 12:58:33 -05:00
Tim Potter
b575ce6b4b
r2226: A bunch of fixes to get python tdb module building again. I'm not
...
sure how this can be integrated into the build system properly though.
Editing makefile.pl is the wrong way to do this.
(This used to be commit e6a42f7880
)
2007-10-10 12:58:32 -05:00
Stefan Metzmacher
fa2e9ec311
r960: convert 'unsigned int' to uint_t in the most places
...
metze
(This used to be commit 18062d2ed9
)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
f2ad98a165
r888: more ..int32 -> ..int32_t stuff
...
metze
(This used to be commit f3b1d3bdc7
)
2007-10-10 12:56:16 -05:00
Tim Potter
75eef34a23
r383: Scripting extensions using swig. This commit includes only a (LGPL)
...
python interface to tdb and a rudimentary build system.
Configure with --with-python and make swig to build and append
$(builddir)/scripting/swig/python to PYTHONPATH.
(This used to be commit bbc15d6f84
)
2007-10-10 12:51:36 -05:00