1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
Commit Graph

3721 Commits

Author SHA1 Message Date
Simo Sorce
b7bc13209f r7267: REMOTE_HOST is a better choice
(This used to be commit 41bae267e2)
2007-10-10 13:17:34 -05:00
Tim Potter
f84d007c43 r7266: Split the different types of js function defines into separate files,
as there are going to be a lot more of them.
(This used to be commit b086768589)
2007-10-10 13:17:34 -05:00
Tim Potter
32f2e9806b r7263: Exit smbscript with the intepreter return value (defaults to 0).
Change the exit value for an exception, usage error and other non-js
errors to 127 which is kinda like the return value for the system(3)
function.
(This used to be commit c77a232b11)
2007-10-10 13:17:33 -05:00
Tim Potter
d6555cadb7 r7262: Add a length property to ARGV array.
(This used to be commit 4b775c619b)
2007-10-10 13:17:33 -05:00
Tim Potter
b124351079 r7261: Pass by reference is done in js via MPR_TYPE_OBJECT. Update argument
parsing and example for resolveName().
(This used to be commit 1a4a549317)
2007-10-10 13:17:33 -05:00
Tim Potter
383c5fb68a r7255: Change syntax of resolveName() js function to be more like the
resolve_name() C function.  I can't figure out how to return variables
by reference though.  Writing to argv[] doesn't seem to work.
(This used to be commit aef99859f2)
2007-10-10 13:17:32 -05:00
Tim Potter
384ad5c71b r7254: Add a mprWERROR() function with the same attributes as mprNTSTATUS.
(This used to be commit 2fa6f7bb2b)
2007-10-10 13:17:32 -05:00
Simo Sorce
266c37e5dc r7238: Add pam auth support in swat
(This used to be commit 8a98572a3b)
2007-10-10 13:17:30 -05:00
Tim Potter
e8cbe7f3a4 r7225: Create a MprVar object from a NTSTATUS, e.g:
res: {
  is_err: true,
  is_ok: false,
  errstr: "NT_STATUS_IO_TIMEOUT",
  v: -1073741643
}
(This used to be commit d81d5f8317)
2007-10-10 13:17:28 -05:00
Tim Potter
c1b95bd467 r7223: Advance script past interpreter line.
(This used to be commit 31b9fadbed)
2007-10-10 13:17:27 -05:00
Tim Potter
afeaf137c4 r7215: Convert smbscript to use ejsEvalScript() and file_load() instead of
ejsEvalFile().

Still need to add advancement of the script past the hash-bang line but
it's home time now!!
(This used to be commit 14a2053c04)
2007-10-10 13:17:27 -05:00
Andrew Tridgell
a05bd5e9d6 r7135: make typeof() complient with ECMA 11.4.3
(This used to be commit 29ab4cc6cb)
2007-10-10 13:17:21 -05:00
Tim Potter
4f1a5b7169 r7083: Add a ejs hook to the resolve_name() function.
We need to figure out what the best way to return NTSTATUS codes.  In the
Python wrappers I threw an exception which could be caught by some code,
but I'm not sure whether this is possible in ejs.
(This used to be commit 6911e46c6a)
2007-10-10 13:17:14 -05:00
Tim Potter
520e2258c9 r7082: Call load_interfaces() in smbscript initialisation.
(This used to be commit 54051bf8bb)
2007-10-10 13:17:13 -05:00
Tim Potter
18fa5ea9ef r7081: Add mprToInt() function.
(This used to be commit 790a46f53b)
2007-10-10 13:17:13 -05:00
Tim Potter
0b2f972c8a r7080: Fix typo in error message.
(This used to be commit fcf177c86e)
2007-10-10 13:17:13 -05:00
Andrew Tridgell
09e00bbdc1 r7078: - fix an uninitialised variable in smbscript
- fixed handle passing in the smb/ejs interface calls, so they can be called
  safely from esp
(This used to be commit 45ea1b6441)
2007-10-10 13:17:13 -05:00
Andrew Tridgell
fe17411203 r7077: pull in a bunch more libs for smbscript. I plan on making a whole lot
of internal functions available to ejs, including rpc functions.

This should hopefully fix the link on solaris10 as well
(This used to be commit caceb31be8)
2007-10-10 13:17:13 -05:00
Andrew Tridgell
f477a74129 r7075: added support for ARGV[] in ejs scripts
(This used to be commit 3db568eb6b)
2007-10-10 13:17:12 -05:00
Andrew Tridgell
8f84f7cdec r7074: we should load all shares in smbscript
(This used to be commit 92f85507df)
2007-10-10 13:17:12 -05:00
Andrew Tridgell
8754c793bf r7072: moved the esp hooks calls to the ejs level, so we can call them from
both esp scripts and ejs scripts. This allows the smbscript program to
call all the existing extension calls like lpGet() and ldbSearch()

Also fixed smbscript to load smb.conf, and setup logging for DEBUG()

I left the unixAuth() routine in web_server/calls.c at the moment, as
that is really only useful for esp scripts. I imagine that as we
extend esp/ejs, we will put some functions in scripting/ejs/ for use
in both ejs and esp, and some functions in web_server/ where they will
only be accessed by esp web scripts
(This used to be commit e59ae64f60)
2007-10-10 13:17:12 -05:00
Volker Lendecke
21f3a3921c r7069: Add a little usage message to smbscript and fix a compiler warning. My
compiler still complains about "handle" (scripting/ejs/smbscrip.c:46) possibly
not being initialized and to me this looks true.

Running smbscript with the trivial write("Hello, world\n"); also leaves some
memory around.

Volker
(This used to be commit 06d27a1921)
2007-10-10 13:17:11 -05:00
Tim Potter
7756b990f3 r7066: Rename http_exception to ejs_exception.
(This used to be commit f2e59d3adf)
2007-10-10 13:17:11 -05:00
Tim Potter
14ade23914 r7065: Move ejs from web_server to lib so it can be shared with smbscript.
(This used to be commit b83dc8fbfb)
2007-10-10 13:17:11 -05:00
Tim Potter
de850cb754 r7064: Clean up handle parameter passing after peeking at tridge's ejstest.c
(This used to be commit 805b6c7cf0)
2007-10-10 13:17:11 -05:00
Tim Potter
e95c8f1911 r7063: Do error checking on the ejs functions.
Tridge says there is a bug in defining per-engine CFunction's so move
calls to ejsDefineStringCFunction() above the ejsOpenEngine() call.

Test script now works!
(This used to be commit 5e2458ae6c)
2007-10-10 13:17:10 -05:00
Tim Potter
10f428b607 r7062: Merge scripting/swig/config.mk with scripting/config.mk
(This used to be commit e14c00c4c1)
2007-10-10 13:17:10 -05:00
Tim Potter
f52a740215 r7061: A ejs scripting client. This should allow javascript to be run in a
command line environment instead of inside the web server.

It doesn't work yet though, rather an exception is thrown when trying
to call ejsDefineStringCFunction().
(This used to be commit 3444cd5429)
2007-10-10 13:17:10 -05:00
Tim Potter
17f1cf0950 r6592: Throw an IOError exception if tdb_open() or tdb_open_Ex() returns NULL.
(This used to be commit 99fb6b6bad)
2007-10-10 13:16:29 -05:00
Tim Potter
c8d0e36312 r6591: Add some comments.
Use SWIG %rename to get rid of prefix on every tdb function.

Treat mode_t as an int so we can actually pass a mode argument to
tdb_open().
(This used to be commit 0abd03f70c)
2007-10-10 13:16:28 -05:00
Tim Potter
6950d5f895 r6590: Remove bogus library versioning variables from swig wrappers.
(This used to be commit 83a125ce57)
2007-10-10 13:16:28 -05:00
Tim Potter
9d87efb681 r6540: Implement a bunch more SAMR functions.
(This used to be commit 7ab240644e)
2007-10-10 13:16:24 -05:00
Tim Potter
5c6e1f81ce r6539: A patch from jbm:
- convert rpcclient to new credential code
  - allow anonymous connections
(This used to be commit f40977c421)
2007-10-10 13:16:24 -05:00
Tim Potter
c23d22e4f1 r6512: Refactor samr torture test to use the nicer OO interface instead of the
previous dictionary based SWIG interface (which was broken anyway).
(This used to be commit 16b7e503bd)
2007-10-10 13:16:21 -05:00
Tim Potter
5fef58af74 r6511: Implement GetUserPwInfo(), QueryUserInfo(), QueryUserInfo2().
(This used to be commit f9742de617)
2007-10-10 13:16:21 -05:00
Tim Potter
93e41274c5 r6510: Initialise rid parameter in samr_RidToSid(). This is faulting for me
on win2k - not sure why.

Add dodgy implementations of QueryDisplayInfo{,2,3}()
(This used to be commit 2e44402751)
2007-10-10 13:16:20 -05:00
Tim Potter
25601d2d67 r6508: Fix typo - yay testsuite.
(This used to be commit 61da936dbc)
2007-10-10 13:16:20 -05:00
Tim Potter
416434fbc4 r6507: Fix syntax error in GetAliasMembership().
Implement SetDomainInfo() which got lost somehow.
(This used to be commit 3055addde6)
2007-10-10 13:16:20 -05:00
Tim Potter
df13db69cc r6506: Rename parameter to GetDomPwInfo.
(This used to be commit 1542a13493)
2007-10-10 13:16:20 -05:00
Tim Potter
c06297f776 r6469: Add CreateDomainGroup, GetAliasMembership.
(This used to be commit acf1d0a1b5)
2007-10-10 13:11:40 -05:00
Tim Potter
6f036daaa4 r6329: Write tests for newly implemented alias functions.
(This used to be commit 30d0c9fb2e)
2007-10-10 13:11:32 -05:00
Tim Potter
0545dfe856 r6328: Fix bug in OpenAlias.
Implement DeleteDomAlias, QueryAliasInfo, SetAliasInfo,
AddAliasMember, and AddMultipleMembersToAlias.

Fix one of those annoying large integer warnings.
(This used to be commit 25ed39651b)
2007-10-10 13:11:32 -05:00
Tim Potter
621588c9e6 r6327: Add LSA objects to dcerpc swig library.
(This used to be commit b6e883a613)
2007-10-10 13:11:32 -05:00
Tim Potter
041e467208 r6326: Add %array_functions for struct lsa_SidPtr.
Pull in the auto-generated interface file for the lsa pipe
(whaddayaknow it compiled first go!)
(This used to be commit fd884ec433)
2007-10-10 13:11:32 -05:00
Tim Potter
602be3fd49 r6324: Pass server name instead of binding string on command line (always use
ncacn_np for the moment).

Fix rpcclient to work with struct cli_credentials.
(This used to be commit 162d3609a1)
2007-10-10 13:11:31 -05:00
Tim Potter
86122d78e5 r6215: Add test for LookupNames. Fix CreateUser2 test.
(This used to be commit e3a69a7322)
2007-10-10 13:11:27 -05:00
Tim Potter
b796dc4077 r6214: Fix typo in DomainHandle.OpenUser() function.
Implement DomainHandle.LookupNames() function.

UserHandle.DeleteUser() closes the handle so don't try and close it
when the GC destroys the class instance.
(This used to be commit 57680163bc)
2007-10-10 13:11:27 -05:00
Tim Potter
f0641cae5d r6213: Add %array_functions for struct samr_String so we can create and
access arrays of them.
(This used to be commit fc2b73d4d7)
2007-10-10 13:11:26 -05:00
Tim Potter
3b64edcfff r6212: Treat uint8 and int8's as integers instead of chars. Swig maps a char
to a string when we really want an integer.
(This used to be commit 86c62b92e8)
2007-10-10 13:11:26 -05:00
Tim Potter
2543885bf3 r6211: Use cli_credentials_set_{domain,username,password}() to fill in
command line arguments for credentials typemap.  Neat!
(This used to be commit a3e7d71463)
2007-10-10 13:11:26 -05:00
Tim Potter
d77e7cd774 r6210: Call cli_credentials_set_conf() when initialising credentials in
cli_credentials typemap.
(This used to be commit 1c88e71ec6)
2007-10-10 13:11:26 -05:00
Tim Potter
e1e8928840 r6208: Add cli_credentials support for swig wrappers. For the moment it
only does anonymous connections.
(This used to be commit b09a472353)
2007-10-10 13:11:26 -05:00
Tim Potter
1fb7f63aa9 r5778: Remove tdb_set_lock_alarm() function from wrappers at tridge's request.
(This used to be commit 8b83eca265)
2007-10-10 13:11:02 -05:00
Tim Potter
fd0aa010be r5777: At some stage SIG_ATOMIC_T was renamed to sig_atomic_t. This should
fix abartlet's compile problem.
(This used to be commit 170139035a)
2007-10-10 13:11:02 -05:00
Tim Potter
11e6c958fd r5369: Rename torture modules so they don't conflict with files in scripting/swig.
Start porting samr torture test to new API.
(This used to be commit 1459393983)
2007-10-10 13:09:47 -05:00
Tim Potter
74e9fce454 r5368: Fix ups for domain_name field name change.
Implement GetDomPwInfo(), CreateUser2(), RemoveMemberFromForeignDomain(),
DeleteUser().
(This used to be commit f9ba35ff83)
2007-10-10 13:09:47 -05:00
Tim Potter
12ccb3c453 r5353: Throw a NTSTATUS exception if a NT error code is returned.
(This used to be commit 4a96778331)
2007-10-10 13:09:45 -05:00
Tim Potter
49568fab37 r5351: Add wrapper for nt_errstr and array functions for samr_ConnectInfo.
(This used to be commit be37749ac7)
2007-10-10 13:09:45 -05:00
Tim Potter
55006da043 r5350: Implement an input typemap for NTSTATUS.
(This used to be commit 076ec6008e)
2007-10-10 13:09:44 -05:00
Tim Potter
8cd9d7095b r5348: Implement the remaining samr connect functions and fix up setsecurity.
(This used to be commit 4b2c3c7ac5)
2007-10-10 13:09:44 -05:00
Tim Potter
4180eedd6d r5335: Add a Close() method to SamrHandle object.
Add methods for {Query,Set}Security, Shutdown, CreateUser,
Open{User,Group,Alias} and RidToSid.

Time for a torture test I think!
(This used to be commit 94a3ff2380)
2007-10-10 13:09:44 -05:00
Tim Potter
57f69e6f37 r5293: Map an empty policy handle to None when creating policy handles, and
refuse to accept None as a policy handle when accepting them.  Now we
don't segfault after running the samr_Shutdown() test.
(This used to be commit 2f0419c4d8)
2007-10-10 13:09:37 -05:00
Tim Potter
7411bf6775 r5247: Fix rpcclient to work with new swig interface.
(This used to be commit ad12a90d0e)
2007-10-10 13:09:34 -05:00
Tim Potter
d8e1c7f0a7 r5244: Convert this module to use the new structure mapping SWIG stuff instead of
the old dictionary based routines.  The SAMR connect, close, enumdomains,
opendomain, enum{users,aliases,groups} functions now work again!
(This used to be commit 53b361657f)
2007-10-10 13:09:33 -05:00
Tim Potter
e282b83381 r5243: Woohoo - memory leak city! Comment out talloc_free() call until I
figure out a better way to pass tallocated memory around with SWIG.
(This used to be commit c63668cbbe)
2007-10-10 13:09:33 -05:00
Tim Potter
a36c43bc21 r5242: Check that argument is an integer or a long for uint32_t input
typemap.

The uint32_t output typemap must return a Python long as an unsigned
uint32_t cannot be fully represented by a Python int.

Likewise for the NTSTATUS typemap.
(This used to be commit 6dba5d6fb4)
2007-10-10 13:09:33 -05:00
Tim Potter
05db954edd r5224: Add in/out typemaps for resume handles. This saves us having to much
around with pointers to just one uint32.

Add an output typemap to copy a policy handle as the talloc context is
destroyed before the wrapper function returns.  More work here needed
to avoid memory leaks.

Use the swig carrays.i file to create accessor and setter functions
for fixed width integer types.  Also add functions for struct samr_SamEntry
as it's returned by the LookupDomain RPC.  This really needs to be
done by pidl so I don't have to go through and find all the structures
that are returned in arrays.

Include security.i to give us SIDs and security descriptors.
(This used to be commit 5a1f6c999e)
2007-10-10 13:09:33 -05:00
Tim Potter
5540449f1c r5095: uint32 -> uint32_t
%include misc.i to get definition of struct policy_handle

Remove #includes we aren't using just now.
(This used to be commit e561bc3efa)
2007-10-10 13:09:22 -05:00
Tim Potter
7e877072bd r5094: Use builtin swig types for converting between fixed width integer types.
(This used to be commit f2a1b237bc)
2007-10-10 13:09:22 -05:00
Tim Potter
d5b8ec7b0e r5074: Remove dead code.
(This used to be commit 36b46bb05a)
2007-10-10 13:09:20 -05:00
Tim Potter
07b65ce281 r5018: Initialise required subsystems (by hand, generated by substituting
BINARY for LIBRARY in config.mk).

Cut things down to just the samr pipe for the moment.
(This used to be commit 95d2a58e5b)
2007-10-10 13:09:14 -05:00
Tim Potter
b10b7a360a r5017: Fix bug in output typemap for uint32 (!)
(This used to be commit dc845154ca)
2007-10-10 13:09:14 -05:00
Tim Potter
5e67970889 r5016: Use LIBRARY instead of BINARY for inserting the swig stuff into the
build system.  This still generates bogus targets (i.e
bin/swig_dcerpc.so.0.0.1) and the subsystem initialisation needs to be
done by hand but it is less of a hack.
(This used to be commit e9b69d19a8)
2007-10-10 13:09:13 -05:00
Tim Potter
8fb54d162b r4982: Start to move swig dependencies into new build system. Unfortunately
I can only get something useful happening by using the BINARY keyword
as nothing else seems to generate dependency lists that can be used
when linking the swig shared libraries.  Anyway this is a lot nicer
than having lots of junk in makefile.pm.
(This used to be commit 71a22f5206)
2007-10-10 13:09:11 -05:00
Tim Potter
29589f3895 r4981: Fix swig build.
(This used to be commit b44ab87c83)
2007-10-10 13:09:11 -05:00
Tim Potter
66bd6142a2 r4546: Use talloc_p() instad of talloc()
(This used to be commit 2ec3a137d7)
2007-10-10 13:08:20 -05:00
Tim Potter
c20a326752 r3870: Delete wrappers for tdb_lockkeys() and tdb_unlockkeys().
(This used to be commit 5af52c559e)
2007-10-10 13:06:00 -05:00
Tim Potter
e0586efe7a r3607: EnumDomainAlises doesn't take a max_size parameter.
(This used to be commit 996d042bf7)
2007-10-10 13:05:38 -05:00
Tim Potter
e34ee4fdaa r3590: Add some more commands to rpcclient from a patch by jbm. Add
SamrQueryDomInfo, SamrQueryDomInfo2, SamrEnumDomainAliases, and
SamrEnumDomainUsers.
(This used to be commit 91eb405354)
2007-10-10 13:05:36 -05:00
Tim Potter
6c32daf320 r3589: Add some extra status codes.
(This used to be commit 6d918f1595)
2007-10-10 13:05:36 -05:00
Tim Potter
3503373ba5 r3588: Fix bug in converting SIDs containing large unsigned integers from Python.
(This used to be commit a46aba4354)
2007-10-10 13:05:36 -05:00
Tim Potter
500ce03f7c r3521: Collect printer driver names in EnumPrinterDrivers.
(This used to be commit 86f54db1ef)
2007-10-10 13:05:28 -05:00
Tim Potter
90a8c4acc7 r3506: Test EnumPorts function.
(This used to be commit 354068aae1)
2007-10-10 13:05:22 -05:00
Tim Potter
e3e5ef95ad r3505: #include dynconfig.h
(This used to be commit 336eba61e9)
2007-10-10 13:05:22 -05:00
Tim Potter
5f68ab2538 r3474: Add conversion functions for the time_t type.
(This used to be commit caa563faaa)
2007-10-10 13:05:18 -05:00
Tim Potter
6afe281de8 r3459: Fix cut&paste error in copyright header.
(This used to be commit 922ea35a4b)
2007-10-10 13:05:16 -05:00
Tim Potter
2f7d7e47e3 r3456: Add appropriate #includes to fix Python extensions build.
(This used to be commit 7e94d5bd3d)
2007-10-10 13:05:15 -05:00
Tim Potter
8c1edd1674 r3430: Add tests for EnumPrinterDataEx, SetPrinterDataEx (doesn't work),
EnumPrinterDrivers.
(This used to be commit fe381c3ebc)
2007-10-10 13:05:10 -05:00
Tim Potter
9ebf74c576 r3411: Ignore some autogenerated files.
(This used to be commit f6428f2d01)
2007-10-10 13:05:06 -05:00
Tim Potter
751b412326 r3410: Handle conversion of DATA_BLOBs and pointers to DATA_BLOBs from python.
(This used to be commit 12e037dbe3)
2007-10-10 13:05:06 -05:00
Tim Potter
5d7c6d7bbd r3405: Test EnumPrinterData and GetPrinterData.
(This used to be commit a4facee860)
2007-10-10 13:05:06 -05:00
Tim Potter
0e082a5c9d r3403: Add test for operations on print server handle.
Add tests for EnumJobs, GetJob.

Oops - forgot to EnumPrinters at level2.
(This used to be commit 930d57964b)
2007-10-10 13:05:06 -05:00
Tim Potter
75f1497c32 r3401: Fix IDL for SetForm RPC.
(This used to be commit 206f3de297)
2007-10-10 13:05:06 -05:00
Tim Potter
89665e87b4 r3396: Rename form_name -> formname. This time, check smbtorture builds before
committing.  (-:
(This used to be commit c776232d01)
2007-10-10 13:05:05 -05:00
Tim Potter
c69b5f7642 r3311: Consistency updates for form name members.
Add tests for EnumForms, GetForm, AddForm, DeleteForm.
(This used to be commit 6c49ce976a)
2007-10-10 13:04:52 -05:00
Tim Potter
d718b7f683 r3309: Add wrapper for dcerpc_server_name() function.
(This used to be commit 2d60a04f21)
2007-10-10 13:04:52 -05:00
Tim Potter
08dd85d26b r3308: Handle servers that don't have samr_Connect5.
(This used to be commit 52af866ffb)
2007-10-10 13:04:52 -05:00
Tim Potter
fe54d8bc99 r3302: The security descriptors in spoolss_PrinterInfo2 and spoolss_PrinterInfo3
need to be marked as subcontext(0).

GetPrinter tests now work for all info levels!
(This used to be commit 53bd02960e)
2007-10-10 13:04:51 -05:00
Tim Potter
8ade4d9785 r3217: Start of a spoolss_GetPrinter test.
(This used to be commit 994fe92feb)
2007-10-10 13:04:42 -05:00
Tim Potter
974d048493 r3216: Add tests for OpenPrinterEx and ClosePrinter.
(This used to be commit b7ff5f0ded)
2007-10-10 13:04:42 -05:00
Tim Potter
266e36aa54 r3204: Got unpacking of an array of PrinterInfo union elements working. Phew.
(This used to be commit f490cd719c)
2007-10-10 13:04:40 -05:00
Tim Potter
85a2db200a r3010: Do some more PyInt vs PyLong checks.
(This used to be commit b19dc6cd9c)
2007-10-10 12:59:57 -05:00
Tim Potter
c7a762bc74 r3009: Fix up unmarshall functions to return Python dict instead of a NTSTATUS.
We can now unmarshall a single printer returned from an EnumPrinters.
(This used to be commit 89da7a9196)
2007-10-10 12:59:56 -05:00
Tim Potter
71aaba4ea7 r3007: uint32 values need to be stored in Python longs, as on 32-bit machines
Python ints can only hold int32 values.
(This used to be commit 7c5ada63bf)
2007-10-10 12:59:56 -05:00
Tim Potter
addb2a9fd4 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!
(This used to be commit 4bc497a299)
2007-10-10 12:59:56 -05:00
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