1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

321 Commits

Author SHA1 Message Date
Stefan Metzmacher
7cb96a785f r20293: implement store chunk hook for libnet_BecomeDC()
metze
(This used to be commit aba497f2fd)
2007-10-10 14:29:33 -05:00
Stefan Metzmacher
fdf95ba005 r20291: implement prepare_db hook of libnet_BecomeDC()
metze
(This used to be commit 07f1075d46)
2007-10-10 14:29:32 -05:00
Stefan Metzmacher
64ba98bbd4 r20285: pass more info to check_options hook and move behavior versions etc.
to the domain and forest structures

metze
(This used to be commit 15157bf5b9)
2007-10-10 14:29:32 -05:00
Stefan Metzmacher
4973fbe773 r20283: pass in callbacks to libnet_BecomeDC() from the caller
and implement the check_options call

metze
(This used to be commit fc9669e2a0)
2007-10-10 14:29:31 -05:00
Stefan Metzmacher
25e468e83f r20144: add NET-API-BECOME-DC test that tests libnet_BecomeDC()/libnet_UnbecomeDC()
metze
(This used to be commit 0359d9a00b)
2007-10-10 14:29:14 -05:00
Rafal Szczesniak
10573be26e r19926: display user listing created by the test.
rafal
(This used to be commit a97fb96203)
2007-10-10 14:28:37 -05:00
Rafal Szczesniak
740843e7fc r19925: Close the lsa handle in the end, and test calling libnet_UserList
with non-zero resume index to continue longer enumeration.

rafal
(This used to be commit efa04d6d0b)
2007-10-10 14:28:37 -05:00
Rafal Szczesniak
1f06299253 r19924: win2k3srv did not like that combination.
rafal
(This used to be commit 11b93da847)
2007-10-10 14:28:37 -05:00
Rafal Szczesniak
afce9d1df8 r19923: Update test to match the function changes.
rafal
(This used to be commit e1a20bba9d)
2007-10-10 14:28:36 -05:00
Rafal Szczesniak
e45922e304 r19593: add NET-API-USERLIST test
rafal
(This used to be commit fba1d8b041)
2007-10-10 14:24:59 -05:00
Rafal Szczesniak
9355c6ff85 r19592: a simple test for libnet_UserList
rafal
(This used to be commit cfcbddfe71)
2007-10-10 14:24:59 -05:00
Jelmer Vernooij
a39f239cb2 r19392: Use torture_setting_* rather than lp_parm_* where possible.
(This used to be commit b28860978f)
2007-10-10 14:21:24 -05:00
Jelmer Vernooij
8773e743c5 r19339: Merge my 4.0-unittest branch. This adds an API for more fine-grained
output in the testsuite rather than just True or False for a
set of tests.

The aim is to use this for:
 * known failure lists (run all tests and detect tests that
						started working or started failing). This
   would allow us to get rid of the RPC-SAMBA3-* tests
 * nicer torture output
 * simplification of the testsuite system
 * compatibility with other unit testing systems
 * easier usage of smbtorture (being able to run one test
						and automatically set up the environment for that)

This is still a work-in-progress; expect more updates over the next couple of
days.
(This used to be commit 0eb6097305)
2007-10-10 14:21:12 -05:00
Rafal Szczesniak
49eb5dc142 r19251: fix silly typos causing the test to fail at account_name
and acct_expiry fields.

rafal
(This used to be commit dba5e642a0)
2007-10-10 14:20:57 -05:00
Stefan Metzmacher
d6e1eb9872 r19187: this function should be static...
(this also fix compiler warnings)

metze
(This used to be commit f8afdac471)
2007-10-10 14:20:51 -05:00
Rafal Szczesniak
ae908a5b06 r19174: fix the test to pass against win2k3 server (username length
limit had been hit here, I guess).

rafal
(This used to be commit 795a37e170)
2007-10-10 14:20:49 -05:00
Rafal Szczesniak
94bc020f84 r19025: - remove read-only and policy dependent fields and flags
- do not stop NET-API-USERMODIFY test when a single field fails
- add account flags to the fields tested
- separate "cleanup" step from closing domain at the end

rafal
(This used to be commit 16fde3b8e2)
2007-10-10 14:20:29 -05:00
Rafal Szczesniak
e99a0dd94a r18753: expand the test so that it does a growing number of changes
(up to 8, currently) randomly generated _and_ verify if the
change has actually been made.

surprising results when running the test (I hope it's just
a bug somewhere in it or in the libnet code).

rafal
(This used to be commit 652a291145)
2007-10-10 14:19:07 -05:00
Rafal Szczesniak
4818a6474c r18691: Forgot to add copyright info.
rafal
(This used to be commit 1289d419a8)
2007-10-10 14:19:02 -05:00
Rafal Szczesniak
a76d3734ae r18683: NET-USERMOD test changed to be able to perform multiple simultaneous
changes.

Also, some common definitions for user mod tests have been put into
a separate file.

rafal
(This used to be commit 0040c08748)
2007-10-10 14:19:01 -05:00
Rafal Szczesniak
07fb9f2f04 r18658: make the test change fields sequentially each one in turn.
now to multiple changes...

rafal
(This used to be commit 6df2c04e03)
2007-10-10 14:19:00 -05:00
Rafal Szczesniak
1eebe9cbe5 r18631: correct unintentional commit.
rafal
(This used to be commit c68ec9109e)
2007-10-10 14:18:58 -05:00
Rafal Szczesniak
d9f0b24cb7 r18626: fix cleanup function to safely recover after interrupted test
and add one requested field in to the function creating testing
set of changes for user modify routine.

rafal
(This used to be commit f6d4f356b3)
2007-10-10 14:18:57 -05:00
Andrew Tridgell
aab0622a75 r18325: more warnings and one compile error on aix fixed
(This used to be commit 6e7e151432)
2007-10-10 14:18:09 -05:00
Rafal Szczesniak
328a02e1ac r18106: Add new samr domain NET tests.
rafal
(This used to be commit 9bc7fb5aea)
2007-10-10 14:17:17 -05:00
Rafal Szczesniak
bb573b4be3 r18105: Fix samr domain open, and implement samr domain close test.
rafal
(This used to be commit 1b8213ba05)
2007-10-10 14:17:17 -05:00
Rafal Szczesniak
05178333d2 r18102: Fix close lsa NET test.
rafal
(This used to be commit df230ad0ca)
2007-10-10 14:17:17 -05:00
Rafal Szczesniak
c51b106ce8 r17940: Fix a warning spotted on the buildfarm.
rafal
(This used to be commit b285a34ddd)
2007-10-10 14:16:56 -05:00
Rafal Szczesniak
b5efc738dd r17939: Fix compiler warnings spotted on buildfarm.
rafal
(This used to be commit 4803e95c68)
2007-10-10 14:16:55 -05:00
Rafal Szczesniak
8856986214 r17858: Add new libnet domain open tests.
rafal
(This used to be commit c9b0b1fb67)
2007-10-10 14:16:49 -05:00
Rafal Szczesniak
e1e0645d18 r17857: A couple of new tests.
rafal
(This used to be commit 6db488cc6e)
2007-10-10 14:16:49 -05:00
Stefan Metzmacher
867d900b56 r17717: this cried for bugs...and they happened...
we were passing a struct timeval reference as string,
and gcc gives a warning...use C99 style initialisation.

is there a special reason why the ACB_NORMAL is passed
when the force_password_change is selected?

metze
(This used to be commit 45061b1b7e)
2007-10-10 14:16:31 -05:00
Rafal Szczesniak
19a88e32cb r17671: Update the tests according to changes in libnet context.
rafal
(This used to be commit 9e7709de62)
2007-10-10 14:16:22 -05:00
Stefan Metzmacher
8c6cb8f09b r17538: this function should be static...
metze
(This used to be commit c4387dd3f6)
2007-10-10 14:15:35 -05:00
Rafal Szczesniak
b26f4472a7 r17484: Make last version of the function generating random set of changes
more fair to each of the fields (ie. don't create new code at midnight
after a long day...).

This will be useful for testing multiple changes at once and verifying
correctness. A few testing runs already demostrated some missing pieces.

rafal
(This used to be commit 809c9cca96)
2007-10-10 14:15:28 -05:00
Rafal Szczesniak
54cde4d21d r17471: Add a function generating pseudorandom set of changes to test
user modify routines.

rafal
(This used to be commit dbd34fe082)
2007-10-10 14:15:27 -05:00
Rafal Szczesniak
1ef10c575d r17449: Add another field to the test before expanding the whole test
to more complex form.

rafal
(This used to be commit e68e296cbe)
2007-10-10 14:15:26 -05:00
Rafal Szczesniak
56bb8f4062 r16900: Nicer display of the test results.
rafal
(This used to be commit bb0e9297b2)
2007-10-10 14:09:58 -05:00
Rafal Szczesniak
82f1374d2b r16897: Don't pass allocated buffer for returned string as the lookup
function allocates it using memory context.
Also, give nicer output of the result of lookup performed.

rafal
(This used to be commit 1bd5661258)
2007-10-10 14:09:57 -05:00
Rafal Szczesniak
304c8fbfbe r16896: Allow to use both binding and unc string to specify host name
being looked up.

rafal
(This used to be commit e597e9867f)
2007-10-10 14:09:57 -05:00
Rafal Szczesniak
1db2f0d3a1 r16533: Perform a cleanup after testing. Also, add changed name argument.
This test currently triggers internal corruption in ldb database,
according to status code returned. I'm investigating win servers
behaviour here.

rafal
(This used to be commit c73f4e11e4)
2007-10-10 14:09:33 -05:00
Rafal Szczesniak
66cc0cbefc r16342: Placeholder for a function implementing NET-API-MODIFYUSER test.
rafal
(This used to be commit 82ac02dd18)
2007-10-10 14:09:11 -05:00
Jelmer Vernooij
a3545383fb r16331: Split out registering of multi fn tests, fix typo in name of pac suite.
(This used to be commit 9e8574ac6c)
2007-10-10 14:09:11 -05:00
Rafal Szczesniak
2a87a112f7 r15939: Add tests for userinfo call with username argument provided
which enables optional stage resolving username to a rid.

rafal
(This used to be commit f57a8ace6f)
2007-10-10 14:08:42 -05:00
Rafal Szczesniak
daa2c3f3f7 r15921: Include new headers.
rafal
(This used to be commit a528b64054)
2007-10-10 14:08:40 -05:00
Andrew Tridgell
72209db1a1 r15898: use d_printf() in some more places to fix more torture seg faults on
solaris
(This used to be commit dd1ef82560)
2007-10-10 14:08:38 -05:00
Andrew Tridgell
d6ac0e7d2f r15897: switch to d_printf() in the libnet_share test, and neaten up the code
a bit using local variables. This should fix a crash on solaris.
(This used to be commit c088654e34)
2007-10-10 14:08:38 -05:00
Simo Sorce
f376b6c386 r15787: NET-API-CREATEUSER was crashing for me because of this uninitialized value...
now it still does not work (auth failure ?!) but at least it does not crash
(This used to be commit 43d9bfeb22)
2007-10-10 14:08:20 -05:00
Rafal Szczesniak
e3ab0d3d67 r15784: Redesign of NET-API-RPCCONNECT tests to cover more cases of usage.
Right now, each level of libnet_RpcConnect can be tested with
correct and incorrect credentials (testing against expected nt
status). Various transports can be tested on NET-API-RPCCONN-BIND
test which does testing on explicitly passed binding string.
Tested services include LSA, SAMR, SRVSVC at the moment.

rafal
(This used to be commit e64084a39d)
2007-10-10 14:08:19 -05:00
Rafal Szczesniak
88b3ccb9de r15664: Add NET-API-DELETEUSER test for libnet_DeleteUser function.
Only the sync version right now.

rafal
(This used to be commit 7b5ebf9392)
2007-10-10 14:08:05 -05:00
Rafal Szczesniak
e7b1b2e79d r15626: Modify the tests to fit them in current changes in libnet
functions.

rafal
(This used to be commit 849e3eee94)
2007-10-10 14:07:24 -05:00
Rafal Szczesniak
a3898df957 r15436: Add test for LIBNET_RPC_CONNECT_DC_INFO level. Display received
information.

rafal
(This used to be commit 76d965b0b0)
2007-10-10 14:05:36 -05:00
Jelmer Vernooij
e002300f23 r15328: Move some functions around, remove dependencies.
Remove some autogenerated headers (which had prototypes now autogenerated by pidl)
Remove ndr_security.h from a few places - it's no longer necessary
(This used to be commit c19c2b51d3)
2007-10-10 14:05:17 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c)
2007-10-10 13:59:44 -05:00
Jelmer Vernooij
909b111f58 r14720: Add torture_context argument to all torture tests
(This used to be commit 3c7a5ce291)
2007-10-10 13:59:13 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513)
2007-10-10 13:58:42 -05:00
Jelmer Vernooij
c67fd3f0e8 r14524: Make TORTURE_NET a separate module
Add new header for torture utility functions, so torture.h doesn't
need to depend on the SMB libraries
(This used to be commit ab162bcafc)
2007-10-10 13:57:36 -05:00
Jelmer Vernooij
4f1c8daa36 r14470: Remove some unnecessary headers.
(This used to be commit f7312dab3b)
2007-10-10 13:57:29 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Jelmer Vernooij
1060f6b3f6 r14402: Generate seperate headers for RPC client functions.
(This used to be commit 7054ebf024)
2007-10-10 13:57:19 -05:00
Jelmer Vernooij
eefe30b7d8 r14379: Build torture/rpc/ as a seperate smbtorture module. Move helper
functions for rpc out of torture/torture.c
(This used to be commit 1d2d970f3b)
2007-10-10 13:57:16 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Andrew Bartlett
4c6b9c79ff r12864: Fix valgrind errors in NET-API-LOOKUP* tests.
Andrew Bartlett
(This used to be commit 21f87f87a9)
2007-10-10 13:50:55 -05:00
Andrew Bartlett
b135f4467f r12858: This moves the libnet_LookupPdc code to use a GetDC request to find
the remote server's name, or in the absence of a local nbt_server to
communicate with (or without root access), a node status request.

The result is that we are in a better position to use kerberos, as well
as to remove the 'password server' mandatory parameter for the samsync
and samdump commands.  (I need this to put these into SWAT).

The only problem I have is that I must create a messaging context, which
requires a server ID.  As a client process, I don't expect to get
messages, but it is currently required for replies, so I generate a
random() number.  We probably need the servers to accept connections on
streamed sockets too, for client-only tasks that want IRPC.

Because I wanted to test this code, I have put the NET-API-* tests into
our test scripts, to ensure they pass and keep passing.  They are good
frontends onto the libnet system, and I see no reason not to test them.

In doing so the NET-API-RPCCONNECT test was simplified to take a
binding string on the command line, removing duplicate code, and
testing the combinations in the scripts instead.

(I have done a bit of work on the list shares code in libnet_share.c
to make it pass 'make test')

In the future, I would like to extend the libcli/findds.c code (based
off volker's winbind/wb_async_helpers.c, which is why it shows up a bit
odd in the patch) to handle getting multiple name replies, sending a
getdc request to each in turn.

(posted to samba-technical for review, and I'll happily update with
any comments)

Andrew Bartlett
(This used to be commit 7ccddfd351)
2007-10-10 13:50:54 -05:00
Rafal Szczesniak
2470034e54 r12835: RpcConnect test expansion to test connecting using ncacp_ip_tcp
as well as ncacn_np.

rafal
(This used to be commit 70cf8a4b67)
2007-10-10 13:50:04 -05:00
Jelmer Vernooij
63d718e243 r12696: Reduce the size of include/structs.h
(This used to be commit 6391761601)
2007-10-10 13:49:40 -05:00
Jelmer Vernooij
25bb00fbcd r12693: Move core data structures out of smb.h into core.h
torture prototypes in seperate header
(This used to be commit 73610639b2)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Jelmer Vernooij
acd6a086b3 r12510: Change the DCE/RPC interfaces to take a pointer to a
dcerpc_interface_table struct rather then a tuple of interface
name, UUID and version.

This removes the requirement for having a global list of DCE/RPC interfaces,
except for these parts of the code that use that list explicitly
(ndrdump and the scanner torture test).

This should also allow us to remove the hack that put the authservice parameter
in the dcerpc_binding struct as it can now be read directly from
dcerpc_interface_table.

I will now modify some of these functions to take a dcerpc_syntax_id
structure rather then a full dcerpc_interface_table.
(This used to be commit 8aae0f168e)
2007-10-10 13:47:48 -05:00
Volker Lendecke
f792c4f8f2 r11527: Has this ever been run?
(This used to be commit 419b28d02d)
2007-10-10 13:45:49 -05:00
Stefan Metzmacher
ab4d635b92 r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.

NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
      state in the _send() function. I haven't fixed this bugs in this
      commit! We may need some composite_trigger_*() functions or so.
      And maybe some other generic helper functions...

metze
(This used to be commit 4527815a0a)
2007-10-10 13:38:57 -05:00
Tim Potter
6e17020de9 r9884: Fix compiler warning.
(This used to be commit 6e30dd8a50)
2007-10-10 13:36:20 -05:00
Rafal Szczesniak
6f6e42c856 r9090: Another field in usermod function - account flags.
rafal
(This used to be commit f0d51b78c0)
2007-10-10 13:31:15 -05:00
Rafal Szczesniak
9d7d5ea229 r9037: New fields in usermod function - allow_password_change and
force_password_change datetime.

rafal
(This used to be commit dfa2cc6c4e)
2007-10-10 13:31:10 -05:00
Stefan Metzmacher
94bc92b708 r9028: make some function static
metze
(This used to be commit 72643ac4c4)
2007-10-10 13:31:09 -05:00
Rafal Szczesniak
26daec8d09 r8977: Put my copyright in share torture test.
rafal
(This used to be commit 186bcabaa6)
2007-10-10 13:31:02 -05:00
Rafal Szczesniak
d1743c93df r8975: Very basic test for delshare function based on code submitted
by Gregory LEOCADIE <gleocadie@idealx.com>.

rafal
(This used to be commit 4d4d1ab37d)
2007-10-10 13:31:02 -05:00
Rafal Szczesniak
798fbb45e3 r8954: Use binding string to specify host rather than share path, as we use
rpc call here after all. Also, safely exit (freeing memory context) in
case of any error.

rafal
(This used to be commit be2584df1d)
2007-10-10 13:31:00 -05:00
Rafal Szczesniak
b0b881a792 r8944: Get more verbose output from NET-API-LISTSHARE test.
rafal
(This used to be commit b1ff59d80f)
2007-10-10 13:30:59 -05:00
Rafal Szczesniak
2a45ec2049 r8930: Add the libnet share tests based on code submitted by
Gregory Leocadie <gleocadie@idealx.com>. Listing shares passes,
deleting not yet - it's a work in progress.

rafal
(This used to be commit 5c53498a4a)
2007-10-10 13:30:58 -05:00
Rafal Szczesniak
2786f847b8 r8897: Add test for the comment field.
rafal
(This used to be commit 3cb517f7c1)
2007-10-10 13:30:16 -05:00
Rafal Szczesniak
5cc8a42a05 r8807: Modifying datetime field using struct timeval argument rather than
text-based, after recent discussion with both Andrews :)

Basic test seems to work (at least it doesn't fail now).

rafal
(This used to be commit 1bc3162e94)
2007-10-10 13:30:06 -05:00
Rafal Szczesniak
b2ed6343cb r8761: Propagate changes in monitor messaging code.
rafal
(This used to be commit 5be8479d5c)
2007-10-10 13:30:03 -05:00
Rafal Szczesniak
2440a008a8 r8759: Another couple of fields in usermod routine.
rafal
(This used to be commit 266aaacf0b)
2007-10-10 13:30:03 -05:00
Rafal Szczesniak
64f31e424b r8721: Further work on libnet_rpc_usermod function. Now it can change
both account name and full name.

rafal
(This used to be commit 1a779f8643)
2007-10-10 13:29:58 -05:00
Rafal Szczesniak
6366a8dc2d r8693: Test code for usermod routine.
rafal
(This used to be commit 19f5ea9c9c)
2007-10-10 13:29:54 -05:00
Stefan Metzmacher
0b92507760 r8232: remove samr_String and netr_String as they are the same as lsa_String
metze
(This used to be commit e601042c07)
2007-10-10 13:19:22 -05:00
Rafal Szczesniak
dd36f13320 r8094: Fix compiler warnings.
rafal
(This used to be commit cca6d79294)
2007-10-10 13:19:07 -05:00
Rafal Szczesniak
2e419725b0 r8081: Add simple test for RpcConnect function.
rafal
(This used to be commit 0209fc67ad)
2007-10-10 13:19:06 -05:00
Rafal Szczesniak
12d4893c28 r8080: Use libnet_context where using libnet_Lookup functions now.
rafal
(This used to be commit 1815a6af06)
2007-10-10 13:19:06 -05:00
Rafal Szczesniak
c2e76c4648 r8079: Dcerpc pipe in libnet_context is just pipe now, instead of explicit samr.
rafal
(This used to be commit e7870156da)
2007-10-10 13:19:06 -05:00
Andrew Tridgell
d60b11c1f0 r7864: fixed some const bugs
(This used to be commit 616f54015f)
2007-10-10 13:18:44 -05:00
Andrew Tridgell
3e47620776 r7858: removed some unused variables
(This used to be commit 8d43eb5b97)
2007-10-10 13:18:43 -05:00
Rafal Szczesniak
cc98a92bb0 r7816: Implementation of "shortcut" function for those (probably many) who
don't like to bother with netbios type names when looking for common
types: hosts (servers) and domain controllers. Also, apropriate tests

rafal
(This used to be commit 50cd94be0f)
2007-10-10 13:18:40 -05:00
Rafal Szczesniak
982b3d7412 r7737: Test for libnet_Lookup function.
rafal
(This used to be commit 4655881fac)
2007-10-10 13:18:28 -05:00
Andrew Tridgell
af237084ec r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
(This used to be commit 3a3025485b)
2007-10-10 13:18:15 -05:00
Tim Potter
fb201ec2af r7628: Unused variables.
(This used to be commit b2529307aa)
2007-10-10 13:18:15 -05:00
Rafal Szczesniak
1104ca3337 r7491: libnet functions used in tests have different names now.
rafal
(This used to be commit d54bf09701)
2007-10-10 13:17:59 -05:00
Rafal Szczesniak
c80aedc744 r7384: I've forgotten to commit test source.
Fix the build and get some sleep...

rafal
(This used to be commit 966d148eca)
2007-10-10 13:17:49 -05:00
Tim Potter
7d3d4d0f3b r7365: Remove unused variables.
(This used to be commit aa3dd5e8cf)
2007-10-10 13:17:47 -05:00
Rafal Szczesniak
adc603731e r7324: Torture test for composite domain open function.
rafal
(This used to be commit 482ff6a780)
2007-10-10 13:17:42 -05:00
Tim Potter
47823c1735 r6847: Fix some unused variable warnings in the libnet torture test.
(This used to be commit 448795607f)
2007-10-10 13:16:50 -05:00
Rafal Szczesniak
84f248ec84 r6717: - torture test of async useradd function and monitor messages.
- make message handling functions static.

rafal
(This used to be commit 96446e5e1e)
2007-10-10 13:16:37 -05:00
Tim Potter
1838812454 r6674: Fix some compiler warnings.
(This used to be commit c2c563bf98)
2007-10-10 13:16:33 -05:00
Rafal Szczesniak
e2cec76d85 r6637: Test for asynchronous function and monitor messages.
rafal
(This used to be commit 4ac3c145fc)
2007-10-10 13:16:32 -05:00
Rafal Szczesniak
9fd63bde85 r6432: Restorin previous construction of conditions after a little discussion
with Richard and Andrew.

rafal
(This used to be commit 400f6d5f87)
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
03cae64229 r6430: Delete existing test account if, for some reason, it hasn't been
deleted last time running the test.

rafal
(This used to be commit 91df25a795)
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
f531686dc4 r6426: DCE/RPC bind string parsing is not needed anymore, as we use
lp_workgroup parameter as domain name to operate on.

rafal
(This used to be commit ea251d4f79)
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
f6e585d69b r6420: Close user account handle before calling tested function to better
simulate real conditions of calling the function.

rafal
(This used to be commit 2518122c9e)
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
adcd33c906 r6415: Added NET-USERDEL torture test which proves something's wrong
with user del function.

rafal
(This used to be commit a6b1911882)
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
aa615263a0 r6405: Complete NET-USERADD torture test for user add composite function.
rafal
(This used to be commit 76fb84c1ee)
2007-10-10 13:11:35 -05:00
Rafal Szczesniak
d7beee39bd r6389: Incomplete test of composite useradd function.
rafal
(This used to be commit 7539397240)
2007-10-10 13:11:35 -05:00
Andrew Tridgell
772f31797d r6165: fixed up the userinfo composite code. Fixes include:
- talloc should always be done in the right context. For example, when creating
  the userinfo_state structure, place it inside the composite
  structure, not directly on the pipe. If this isn't done then
  correct cleanup can't happen on errors (as cleanup destroys the top
  level composite context only)

- define private structures like userinfo_state in the userinfo.c
  code, not in the public header

- only keep the parameters we need in the state structure. For
  example, the domain_handle is only needed in the first call, so we
  don't need to keep it around in the state structure, but the level is
  needed in later calls, so we need to keep it

- always initialise [out,ref] parameters in RPC calls. The [ref] part
  means that the call assumes the pointer it has been given is
  valid. If you don't initialise it then you will get a segv on
  recv. This is why the code was dying.

- don't use internal strucrure elements like the pipe
  pipe->conn->pending outside of the internal rpc implementation. That
  is an internal list, trying to use it from external code will cause crashes.

- rpc calls assume that rpc call strucrures remain valid for the
  duration of the call. This means you need to keep the structures
  (such as "struct samr_Close") in the userinfo_state strucrure,
  otherwise it will go out of scope during the async processing

- need to remember to change c->state to SMBCLI_REQUEST_DONE when the
  request has finished in the close handler, otherwise it will loop
  forever trying to close

Mimir, please look at the diff carefully for more detailed info on the fixes
(This used to be commit 01ea1e7762)
2007-10-10 13:11:23 -05:00
Andrew Bartlett
645711c602 r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree...
The main volume of this patch was what I started working on today:
 - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context.
 - Uses sepereate inner loops for some of the DCE/RPC tests

The other and more important part of this patch fixes issues
surrounding the new credentials framwork:

This makes the struct cli_credentials always a talloc() structure,
rather than on the stack.  Parts of the cli_credentials code already
assumed this.

There were other issues, particularly in the DCERPC over SMB handling,
as well as little things that had to be tidied up before test_w2k3.sh
would start to pass.

Andrew Bartlett
(This used to be commit 0453f9d05d)
2007-10-10 13:11:11 -05:00
Andrew Bartlett
df64302213 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
(This used to be commit 824289dcc2)
2007-10-10 13:11:07 -05:00
Stefan Metzmacher
c857c03170 r5681: fix the build and compiler wanings
metze
(This used to be commit bb2622a0c9)
2007-10-10 13:11:00 -05:00
Rafal Szczesniak
983306c819 r5679: Complete basic test of rpc_composite_userinfo function (which
btw proves the function is completely broken but that's what
tests are for)

rafal
(This used to be commit 7278c7d837)
2007-10-10 13:10:59 -05:00
Jelmer Vernooij
631aa1f0ef r5661: Be a little stricter on syntax regarding arrays. A pointer to an
array can now only be :

 type *name[];

rather then :

 type *name;

which was supported in the past. Warnings will be given when the first
syntax is used. Reasons for this change in behaviour include improved
readability and the fact that the second format makes dealing with multiple
levels of pointers harder.
(This used to be commit a416de5825)
2007-10-10 13:10:57 -05:00
Rafal Szczesniak
b55b885f1b r5651: A bit more code in userinfo test and hook up test function to
main torture binary.

rafal
(This used to be commit 94955e5325)
2007-10-10 13:10:56 -05:00
Rafal Szczesniak
70ae0bb382 r5610: Starting libnet test of userinfo call. Unfinished yet, though
doesn't break anything at the moment.

rafal
(This used to be commit eb13c1bcfc)
2007-10-10 13:10:56 -05:00