1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-12 04:23:49 +03:00
Commit Graph

70 Commits

Author SHA1 Message Date
Tim Potter
b19dc6cd9c r3010: Do some more PyInt vs PyLong checks. 2007-10-10 12:59:57 -05:00
Tim Potter
89da7a9196 r3009: Fix up unmarshall functions to return Python dict instead of a NTSTATUS.
We can now unmarshall a single printer returned from an EnumPrinters.
2007-10-10 12:59:56 -05:00
Tim Potter
7c5ada63bf r3007: uint32 values need to be stored in Python longs, as on 32-bit machines
Python ints can only hold int32 values.
2007-10-10 12:59:56 -05:00
Tim Potter
4bc497a299 r3001: Expose unmarshalling functions for structures marked "public" in the
idl.  This allows us to pass a buffer of bytes returned from a spoolss
call and convert it to a Python dictionary.  Works for enumprinters level
1!
2007-10-10 12:59:56 -05:00
Tim Potter
558076cc8d 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
2007-10-10 12:59:55 -05:00
Tim Potter
e6756e3ee0 r2986: Add correct value to dict when generating wrapper for functions that
return WERROR values.

Clean up WERROR vs NTSTATUS handling a bit.
2007-10-10 12:59:54 -05:00
Tim Potter
a079e044f0 r2975: Try to emulate NT_STATUS_IS_ERR() functionality for WERRORs. Unfortunately
this means enumerating all the ones we don't think are errors.
2007-10-10 12:59:53 -05:00
Tim Potter
15f8f73f8b 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.
2007-10-10 12:59:52 -05:00
Tim Potter
44bab84f76 r2965: Ignore *.pyc files in torture directory.
Allow test module name to be specified on command line for pytorture
module.

Start spoolss torture test.
2007-10-10 12:59:52 -05:00
Tim Potter
96d31ff19d r2964: Add spoolss to list of wrapped client functions. 2007-10-10 12:59:52 -05:00
Tim Potter
bc5165e40a r2817: Get winreg_GetKeySecurity() working but use data blob instead of
security descriptor.
2007-10-10 12:59:36 -05:00
Tim Potter
c09f0f355b 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.
2007-10-10 12:59:36 -05:00
Tim Potter
bb1be78197 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.
2007-10-10 12:59:35 -05:00
Tim Potter
12a3f75c1c r2795: Split status code constants into a separate file. 2007-10-10 12:59:34 -05:00
Tim Potter
294d1ae35c 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.
2007-10-10 12:59:34 -05:00
Tim Potter
cc646f73b8 r2781: Got winreg_EnumValue() working. Check it in so I don't break it trying
to clean it up.  (-:
2007-10-10 12:59:32 -05:00
Tim Potter
c9e96038f8 r2780: Add conversion routines for DATA_BLOB. I'm not convinced that DATA_BLOB's
should be treated as scalar types though.
2007-10-10 12:59:32 -05:00
Tim Potter
37af942d08 r2766: Test OpenKey, QueryInfoKey, EnumKey, CloseKey functions.
The IDL for EnumValue is wrong - can't figure it out right now.
2007-10-10 12:59:31 -05:00
Tim Potter
6f3f6de058 r2765: Allow functions containing WERROR values to be compiled.
Add winreg.i to list of extensions.
2007-10-10 12:59:31 -05:00
Tim Potter
cf9b984b84 r2739: Start of torture test for winreg wrappers. 2007-10-10 12:59:29 -05:00
Tim Potter
799b377bad r2728: Break arg parsing stuff out of samr.py into a standalone program. 2007-10-10 12:59:27 -05:00
Tim Potter
3170f6ed84 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.
2007-10-10 12:59:06 -05:00
Tim Potter
e9eb231d64 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.
2007-10-10 12:59:06 -05:00
Tim Potter
c9d6827312 r2555: Start of a rpcclient type program. 2007-10-10 12:59:05 -05:00
Tim Potter
471b13da2b r2511: Add NT status codes. 2007-10-10 12:59:00 -05:00
Tim Potter
808e0708a9 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.
2007-10-10 12:58:59 -05:00
Tim Potter
991d783c1a r2492: Some cleanups.
Add tests for samr_CreateDomainGroup, samr_DeleteDomainGroup,
samr_QueryDomainInfo, samr_SetDomainInfo, samr_EnumDomainUsers,
samr_EnumDomainAliases, samr_EnumDomainGroups.
2007-10-10 12:58:57 -05:00
Tim Potter
4ddcae90a2 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.
2007-10-10 12:58:57 -05:00
Tim Potter
f09fee9239 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.
2007-10-10 12:58:57 -05:00
Tim Potter
632b7cc0d6 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.
2007-10-10 12:58:55 -05:00
Tim Potter
1dc86e466d 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.
2007-10-10 12:58:51 -05:00
Tim Potter
086740c178 r2427: Add tests for samr_GetDomPwInfo, samr_RemoveMemberFromForeignDomain,
samr_LookupName, samr_OpenUser, samr_DeleteUser, samr_CreateUse and
samr_OpenDomain.
2007-10-10 12:58:51 -05:00
Tim Potter
aaef6eaf6e r2424: Refactor handling of non-OK NTSTATUS returns to be more swiggish. 2007-10-10 12:58:51 -05:00
Tim Potter
7a7cf9f352 r2423: Add some instructions for building extensions. 2007-10-10 12:58:51 -05:00
Tim Potter
57edfd605b r2421: Fix test for lookupdomain for a non-existent domain.
Export NTSTATUS exception from wrapper module so it can be used by scripts.
2007-10-10 12:58:50 -05:00
Tim Potter
aa15fd1ecb r2419: Write tests for samr_EnumDomains() and samr_LookupDomain(). 2007-10-10 12:58:50 -05:00
Tim Potter
fc5443af9c r2416: More argument checks. Raise an exception instead of segfaulting if a
dictionary does not contain a required key.
2007-10-10 12:58:50 -05:00
Tim Potter
0f58ffb142 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.
2007-10-10 12:58:50 -05:00
Tim Potter
e1166c2100 r2414: samr_Connect.system_name is now an array. 2007-10-10 12:58:50 -05:00
Tim Potter
e822979e84 r2410: Add test for samr_SetSecurity(). 2007-10-10 12:58:49 -05:00
Tim Potter
160dc90921 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).
2007-10-10 12:58:49 -05:00
Tim Potter
945a468105 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.
2007-10-10 12:58:46 -05:00
Tim Potter
84513e4ed1 r2358: More renaming of functions to keep things consistent. 2007-10-10 12:58:46 -05:00
Tim Potter
c8d13a809b r2357: Start coding conversion routines for security descriptors, acls and sids. 2007-10-10 12:58:45 -05:00
Tim Potter
f6978a007a r2345: Add test for samr_QuerySecurity() 2007-10-10 12:58:45 -05:00
Tim Potter
a3eac318a6 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).
2007-10-10 12:58:45 -05:00
Tim Potter
b7ef3d0a00 r2342: Remove obsolete file. 2007-10-10 12:58:45 -05:00
Andrew Tridgell
e94bec1079 r2339: my first python commit!
added command line options for binding string, domain, username and password
2007-10-10 12:58:44 -05:00
Tim Potter
30f068164a 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.
2007-10-10 12:58:44 -05:00
Tim Potter
d6876701cc r2324: Add hand-written versions of functions from misc.idl. 2007-10-10 12:58:44 -05:00