1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

4432 Commits

Author SHA1 Message Date
Andrew Bartlett
ecf782da87 s4:torture Rework NET-API-BECOMEDC test to use libnet_vampire callbacks.
The libnet_vampire code was derived from this code in the first place,
but has continued to evolve, while this code has often bitrotted.
This avoids the needless duplication of the callbacks, while keeping
the toture wrapper.

Andrew Bartlett

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-06-15 10:51:34 +10:00
Zachary Loafman
2977c659ea s4 torture: RAW-WRITE should check lockread_supported
Signed-off-by: Tim Prouty <tprouty@samba.org>
2010-06-14 17:13:44 -07:00
Matthias Dieter Wallnöfer
4d68147160 s4:torture - SAMR testsuite - now we do support "GetAliasMembership" as expected 2010-06-12 16:45:49 +02:00
Kamen Mazdrashki
c65eb4852c s4/test-libnet: Re-align code a bit - more readable this way IMO 2010-06-11 17:46:36 +03:00
Kamen Mazdrashki
9baa73053e s4/test-libnet: Refactor test_group_create() a little to:
- Close unused policy handle for created group
- re-align code - it is more readable this way IMHO
2010-06-11 17:46:35 +03:00
Kamen Mazdrashki
6eecb968cb s4/test-libnet: Refactor test_user_create() little bit to:
- fix a flaw that user RID is not returned in case
  user is recreated
- close unused policy handle to created user
- do not take into account the result from
  test_samr_close_handle - we don't case
2010-06-11 17:46:35 +03:00
Kamen Mazdrashki
a735c1ade2 s4/test-libnet: add few comments for utility functions 2010-06-11 17:46:35 +03:00
Kamen Mazdrashki
84fb3ed8a5 s4/test-libnet: Move LSA close handle function to a common location 2010-06-11 17:46:34 +03:00
Kamen Mazdrashki
8714f130e5 s4/test-libnet: remove unused code
Pre-connecting SAMR and LSA pipes is implemented in
test_libnet_context_init() function
2010-06-11 17:46:34 +03:00
Kamen Mazdrashki
7168b1c99f s4/test-libnet: Fix compile-time warning 2010-06-11 17:46:34 +03:00
Günther Deschner
bcc4383ef2 s4-smbtorture: rework internals of RPC-SPOOLSS-ACCESS testsuite.
Guenther
2010-06-11 00:31:17 +02:00
Kamen Mazdrashki
1ceb0dd92f s4/test: use test_libnet_context_init() function to create libnet_context
This way we ensure that LIBNET call will be issued against
the DC we are testing against
2010-06-11 01:20:10 +03:00
Kamen Mazdrashki
d6d8ec80f9 s4/test: fix SEGFAULT in test_group_create when rid is NULL
Caller of this function may not need group RID and
in such case it passes NULL for rid parameter
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
eda4926120 s4/test-libnet: Helper func to initialize libnet_context
and create rpc connections to SAMR and LSA pipes.
This function should be used in cases where we need
'deterministic' connection to the DC we are testing against.

The problem is that most of the test follow the pattern:
1. Connect to server supplied on command line
2. Create user/group through connection in 1.
3. Use 'fresh' libnet_context to query/alter the object in
   step 2.

In singe-DC environment this work well. But in multiple-DC
environment libnet may connect to another DC (step 3), not
the one we use in step 1 and 2. This leads to false error -
object created in step 2 is not found on DC we are querying
in step 3.
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
85d7863b2c s4/test: Call test_user_cleanup with original RDN for the user
'name' var is changed during the test execution and should
contain samAccountName for the user, while test_user_cleanup()
expects account RDN to be passed
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
61e5ac4a5a s4/test: Fix incorrect NTSTATUS comparison
In case group already exists, we should get NT_STATUS_GROUP_EXISTS.
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
64a71d380c s4/test: remove create/delete group implementation in API-CREATEGROUP test
We already have common implementation for create/delete
group in libnet/utils.c
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
d02c395abd s4/test: Remove duplicated test_opendomain() functionality
We already have a nice common test_domain_open()
function in libnet/util.c
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
7135abcd8d s4/test: libnet_user tests should use common test_user_cleanup
implementation instead of not-so-informative test_cleanup()
2010-06-11 01:20:08 +03:00
Kamen Mazdrashki
d1bcc23b2c s4/test: Refactor test_user_cleanup to be more robust
We always call this function with user's account RDN
while samr_LookupNames() searches for samAccountName.
2010-06-11 01:20:08 +03:00
Kamen Mazdrashki
1b8a8ddfe0 s4/test: remove duplicated comment 2010-06-11 01:20:08 +03:00
Günther Deschner
5def19e4dc s4-smbtorture: test workstation auth as well in RPC-SPOOLSS-ACCESS.
Guenther
2010-06-07 12:58:46 +02:00
Günther Deschner
e271a2b861 s4-smbtorture: handle printservers w/o printers in RPC-SPOOLSS-ACCESS.
Guenther
2010-06-07 11:21:26 +02:00
Günther Deschner
6309f7b950 s4-smbtorture: make RPC-SPOOLSS-ACCESS more compatible with older samba releases.
Guenther
2010-06-05 01:26:49 +02:00
Günther Deschner
3ad2fa6728 s4-smbtorture: remove another incarnation of test_ClosePrinter.
This should fix the build; why waf didn't catch that durint make bin/smbtorture4 ?

Guenther
2010-06-05 01:25:05 +02:00
Günther Deschner
e89502e0f5 s4-smbtorture: add RPC-SPOOLSS-ACCESS.
This test creates

- a user
- a user with BUILTIN\Administrators membership
- a user with BUILTIN\Print Operators membership
- a user with SePrintOperatorPrivilege (if available)
- a user with full access in security descriptor

and checks what access rights are granted in spoolss_OpenPrinterEx.

Guenther
2010-06-05 00:35:09 +02:00
Günther Deschner
29c0c103af s4-smbtorture: share test_ClosePrinter between RPC-SPOOLSS and RPC-SPOOLSS-WIN.
Guenther
2010-06-05 00:35:09 +02:00
Günther Deschner
8b3059de97 s4-smbtorture: check error codes in RAP-SAM testsuite.
Guenther
2010-06-05 00:35:09 +02:00
Günther Deschner
bb4693d15e s4-smbtorture: completely rework RPC-SPOOLSS-PRINTER.
This is now a child testsuite to RPC-SPOOLSS. You can call simple tests via
RPC-SPOOLSS-{addprinter,addprinterex}-testname.

Guenther
2010-06-04 14:24:24 +02:00
Günther Deschner
789125f9a4 s4-smbtorture: rework order of test in RPC-SPOOLSS-PRINTSERVER a bit.
Guenther
2010-06-04 14:24:05 +02:00
Günther Deschner
e65164ff48 s4-smbtorture: convert RPC-SPOOLSS into a torture suite.
Guenther
2010-06-03 18:31:23 +02:00
Günther Deschner
9884bf7d57 s4-smbtorture: allow to call single tests from a testcase in a testsuite
directly on the commandline.

Guenther
2010-06-03 18:29:46 +02:00
Günther Deschner
8131e9f290 s4-smbtorture: move PrintProcessors winreg test to main RPC-SPOOLSS test.
Guenther
2010-06-03 14:54:49 +02:00
Günther Deschner
6acaa70d64 s4-smbtorture: add test_PrintProcessors_winreg.
This does cross reference checks between spoolss PrintProcessors and entries
stored in winreg.

Guenther
2010-06-03 13:01:40 +02:00
Günther Deschner
4a10635371 s4-smbtorture: refactor test_EnumPrintProcessors().
Guenther
2010-06-03 13:01:16 +02:00
Günther Deschner
3948876f66 s4-smbtorture: only test data up to a length of 9 bytes in test_SetPrinterDataEx_matrix().
Guenther
2010-06-03 11:46:44 +02:00
Günther Deschner
23eb2888d9 s4-smbtorture: skip driverName and printerName DsSpooler tests for now.
Guenther
2010-06-01 16:49:25 +02:00
Günther Deschner
582847412a s4-smbtorture: Make sure RPC-SPOOLSS and RPC-SPOOLSS-PRINTER pass against s3.
Printjobs are extremely fragile beasts on paused virtual printers within make
test. Very often the printq updater in the background is not fast enough, so
subsequent tests don't get to the updated information. Something to remember and
to work on later...

Guenther
2010-06-01 16:49:24 +02:00
Matthias Dieter Wallnöfer
11e2608ba9 s3/s4:netrEnumerateTrustedDomains - this call returns a "NTSTATUS" result
See MS-NRPC 3.5.5.6.3.
2010-05-31 12:08:59 +02:00
Matthias Dieter Wallnöfer
aaf1c751f4 s4:torture/rpc/netlogon.c - add another "LogonGetDomainInfo" testcase
Mark it as dangerous since it does break some target systems.
2010-05-31 12:08:32 +02:00
Kamen Mazdrashki
c9c8de3dcb s4/test-libnet: Remove multiple test_samr_close() impelementations
We now have a nice common test_samr_close_handle() function to use
2010-05-28 22:30:10 +03:00
Kamen Mazdrashki
c742f59bd2 s4/test-libnet-user: Remove test_createuser()
We have same functionality already implemented by
test_user_create() in libnet/utils.c
2010-05-28 22:30:10 +03:00
Kamen Mazdrashki
0f2263016f s4/test-libnet-utils: refactor test_user_create()
- param names made more clear what they stand for
- user RID out param is now optional, so that this function may
  be used in cases where we don't need user RID
- SAMR connection handle is closed as it is not used further
  (we should play nice with servers)
2010-05-28 22:30:09 +03:00
Kamen Mazdrashki
8dedb4d06e s4/test: remove local impl for open_domain and use common one 2010-05-28 22:30:09 +03:00
Kamen Mazdrashki
fce427134d s4/test: remove torture/libnet/utils.h as we are using proto.h now 2010-05-28 22:30:09 +03:00
Kamen Mazdrashki
1118c7b0e4 s4/test: change prototype for test_opendomain()
- name changed to test_domain_open to be more alike athore functions
  in utils.c file
- output parameters moved to the end param list definition just
  after mem_ctx so it is somehow more clear those params are OUT
2010-05-28 22:30:08 +03:00
Kamen Mazdrashki
8e3a433f93 s4/test: Refactor test_opendomain to address following
- param names made more clear what they stand for
- dom_sid out param is now optional, so that this function may
  be used in cases where we don't need dom_sid
- SAMR connection handle is closed as it is not used further
2010-05-28 22:30:08 +03:00
Kamen Mazdrashki
3a899e24d5 s4/test: make samr_close handle functio public
It is to be used further for closing opened handles when testing
using SAMR interface
2010-05-28 22:30:08 +03:00
Kamen Mazdrashki
cf79435545 s4/test: refactor NET-USERINFO test to be more 'torture' friendly
Test may be further refactored to be converted as a test case
(what it is actually)
2010-05-28 22:30:07 +03:00
Kamen Mazdrashki
2053403045 s4/test: test_userinfo/_async tests should use passed user_name param value 2010-05-28 22:30:07 +03:00