1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-31 12:23:52 +03:00
Commit Graph

45 Commits

Author SHA1 Message Date
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
Tim Potter
73e087f11e r2300: Start writing a Python torture test suite based on the smbtorture rpc tests. 2007-10-10 12:58:41 -05:00
Tim Potter
05cff58070 r2299: Map a (C) NULL pointer to (Python) None and vice versa. 2007-10-10 12:58:41 -05:00
Tim Potter
cbfb177394 r2297: Add string conversion functions. 2007-10-10 12:58:40 -05:00
Tim Potter
e4a5840ff8 r2296: Correct setting of access_mask in test program. 2007-10-10 12:58:40 -05:00
Tim Potter
d31d23b944 r2295: Convert simple scalar types and policy handles between dcerpc function
call request and response structures.
2007-10-10 12:58:40 -05:00
Tim Potter
5a64449599 r2278: Add some more helper functions. 2007-10-10 12:58:38 -05:00
Tim Potter
b7ebafbbe0 r2276: Remove garbage collection debugs. 2007-10-10 12:58:37 -05:00
Tim Potter
55bd2dc02d r2256: Include autogenerated interfaces for lsa and samr pipes. Typemaps are currently
not working though.
2007-10-10 12:58:35 -05:00
Tim Potter
fd31ae38df r2253: Add test program, as small example of what's going on. 2007-10-10 12:58:35 -05:00
Tim Potter
301bb069c3 r2243: Include definition for PRINTF_ATTRIBUTE in Python tdb wrapper. 2007-10-10 12:58:34 -05:00
Tim Potter
fdfabbd4a5 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!
2007-10-10 12:58:33 -05:00
Tim Potter
5fead63618 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.
2007-10-10 12:58:33 -05:00
Tim Potter
e1a368050d r2230: Wrapper for dcerpc_samr_Connect2(). All this glue code should be
automatically generated but at the moment it's hand coded.
2007-10-10 12:58:33 -05:00
Tim Potter
a3a85bd419 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.
2007-10-10 12:58:33 -05:00
Tim Potter
f5852bf3e2 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.
2007-10-10 12:58:33 -05:00
Tim Potter
64f961f039 r2227: Get rid of annoying compiler warning. 2007-10-10 12:58:33 -05:00
Tim Potter
e6a42f7880 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.
2007-10-10 12:58:32 -05:00
Stefan Metzmacher
18062d2ed9 r960: convert 'unsigned int' to uint_t in the most places
metze
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
f3b1d3bdc7 r888: more ..int32 -> ..int32_t stuff
metze
2007-10-10 12:56:16 -05:00
Tim Potter
bbc15d6f84 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.
2007-10-10 12:51:36 -05:00