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

2720 Commits

Author SHA1 Message Date
Günther Deschner
612714d109 s4-torture: disable s4u2self/proxy remote pac tests for MIT build for now.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-04-29 23:31:09 +02:00
Andreas Schneider
f0e8d98b79 s4:torture: Fix the remote_pac test
All the Kerberos implementation do not expect an order of the pac
buffer. The buffers are not processed in the oder they are sent but when
required just located.

I confirmed this with MS at the IO Lab.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-04-29 23:31:08 +02:00
Jeremy Allison
306783d6f5 lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *)
Not currently used - no logic changes inside.

This will make it possible to pass down a long-lived talloc
context from the loading function for modules to use instead
of having them internally all use talloc_autofree_context()
which is a hidden global.

Updated all known module interface numbers, and added a
WHATSNEW.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Ralph Böhme <slow@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
2017-04-22 01:17:00 +02:00
Günther Deschner
06e4d1c174 s4-torture: cleanup after printing tests that had to add a driver
We were only removing drivers from the upload area but did not delete
them via spoolss.

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
2017-01-12 15:35:13 +01:00
Andreas Schneider
39489a8ca9 s4-torture: cleanup architecture handling in spoolss driver tests.
Make sure the architecture field of the driver8 definition is always set
to the local environment (the one of the driver to be uploaded and
tested)

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
2017-01-12 15:35:13 +01:00
Volker Lendecke
98bcdca632 torture-netlogon: Use "all_zero" where appropriate
... Saves a few bytes of footprint

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jan  3 19:56:17 CET 2017 on sn-devel-144
2017-01-03 19:56:17 +01:00
Volker Lendecke
015a41a5e3 torture-samlogon: Avoid static zeros
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-01-03 16:04:29 +01:00
Volker Lendecke
b3d5fe9679 torture-samlogon: Use "all_zero" where appropriate
... Saves a few bytes of footprint

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-01-03 16:04:29 +01:00
Andrew Bartlett
cf536e36fb torture: Add ServerReqChallengeReuseGlobal2 to rpc.netlogon
This test ensures that when the per-pipe challenge is used, the tdb cache
is wiped as well

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Dec 14 15:56:37 CET 2016 on sn-devel-144
2016-12-14 15:56:37 +01:00
Andrew Bartlett
5434bde87b torture: Add ServerReqChallengeReuse to rpc.netlogon
This test covers credentials reuse on the same process.

We test with direct re-use, and for the case where the challenge
is reset to zeros.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-14 11:55:18 +01:00
Andrew Bartlett
568d250bfb torture: Add new test ServerReqChallengeReuseGlobal to rpc.netlogon
This tests ensures we can not re-use the entries in global challenge table.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-14 11:55:18 +01:00
Andrew Bartlett
f55dc9cf72 torture/samba3rpc: Use NETLOGON_NEG_AUTH2_ADS_FLAGS
This allows this test to pass after "allow nt4 crypto" is removed from
the default environment.

We now only set it in ad_dc

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-14 11:55:18 +01:00
Andrew Bartlett
380ec1bb72 torture: Use DCERPC_SCHANNEL_AUTO in rpc.schannel.schannel2 test
This allows it to run against modern servers that do not permit NT4 crypto

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-14 11:55:18 +01:00
Andrew Bartlett
ecb1f569d7 torture: Add credentials downgrade and challenge reuse test to rpc.netlogon
This test confirms that the challenge set up is available
after the ServerAuthenticate has failed at the NT_STATUS_DOWNGRADE_DETECTED
check.

This is needed for NetApp ONTAP member servers.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11291

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-14 11:55:18 +01:00
Volker Lendecke
95353409ac torture: upload_printer_driver_file xfile->stdio
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-12-11 11:17:23 +01:00
Andrew Bartlett
bf7342bdf4 torture: Remove access to LSARPC via \\pipe\netlogon in rpc.netlogon for ManyGetDCName test
This exploited the fact that we had \\pipe\lsass in both netlogon.idl and lsarpc.idl

To do this, we reset the binding to a new endpoint and reset the association group.

We add a new test specifically for this "feature" that we can knownfail if we
break it to add other new functionality.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:22 +01:00
Günther Deschner
4d918d5100 s4-torture: test valid environment in spoolss_EnumMonitors level 2.
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2016-11-21 14:52:25 +01:00
Andreas Schneider
b1ade58ffe s4:torture: Add tortue test for AddPrinterDriverEx with COPY_FROM_DIRECTORY
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415

Pair-Programmed-With: Guenther Deschner <gd@samba.org>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Nov 20 21:21:32 CET 2016 on sn-devel-144
2016-11-20 21:21:32 +01:00
Günther Deschner
e95012b01f s4-torture: add test to compare PRINTER_INFO_STRESS version and OSVersion
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-20 02:28:10 +01:00
Andreas Schneider
9de04626c0 s4:torture: Fix cleanup of the secrets object in session_key test
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433

The test is known to be failing if sealing is turned on in some
circumstances. In this case a secret is created and then the function
dcerpc_fetch_session_key() fails. The secret is not removed!

We use torturesecret-%08x with random() to fill in the number. Sometimes
it happens that random() returns a number we already used. So we end up
trying to create a secret for an entry which already exists and run
into a collision

This change makes sure we always cleanup behind us and do not leave
secret objects we created.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov 17 22:30:36 CET 2016 on sn-devel-144
2016-11-17 22:30:36 +01:00
Andreas Schneider
31d21de548 s4:torture: Normalizes names in session_key test
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-17 18:36:19 +01:00
Andreas Schneider
80f7f568f8 s4:torture: Strip trailing whitespaces in session_key.c
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-17 18:36:19 +01:00
Günther Deschner
5462d2727d s4-torture: add test for winspool_AsyncGetPrinterDriverDirectory()
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 15 05:09:31 CET 2016 on sn-devel-144
2016-11-15 05:09:31 +01:00
Günther Deschner
39ac61b993 s4-torture: add test for winspool_AsyncDeletePrintDriverPackage
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:23 +01:00
Günther Deschner
3268150b19 s4-torture: add test for winspool_AsyncCorePrinterDriverInstalled
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
887e00cb0f s4-torture: add test for spoolss vs. iremotewinspool context handles
This test demonstrates that one cannot use a handle retrieved via
iremotewinspool in a spoolss context.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
20b4b2bdca s4-torture: add test for winspool_AsyncGetPrinterData
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
2c0350a04a s4-torture: add test for winspool_AsyncEnumPrinters
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
b933b8ee86 s4-torture: add test for winspool_AsyncUploadPrinterDriverPackage
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
01f859386d s4-torture: add test for winspool_SyncUnRegisterForRemoteNotifications.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
4b7097f833 s4-torture: add test for winspool_SyncRegisterForRemoteNotifications.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:22 +01:00
Günther Deschner
8d0ad4126c s4-torture: add IRemoteWinspool rpc testsuite.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:21 +01:00
Günther Deschner
b53b3b8e32 s4-torture: add torture_rpc_connection_with_binding()
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-15 01:14:21 +01:00
Günther Deschner
ef661b1bd9 s4-torture: Fix test_EnumPrinterDrivers for level 8 printer drivers.
Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-11 22:57:23 +01:00
Günther Deschner
73f664710a spoolss: Use correct values for secdesc and devmode pointers
ULONG_PTR needs to be decoded as a uint3264 and not as a 'uint32 *'.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11197

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-11 22:57:22 +01:00
Stefan Metzmacher
5bad447768 s4:torture/rpc: concurrent dcerpc_echo_TestSleep requests require a connection with DCERPC_CONCURRENT_MULTIPLEX
Concurrent requests are only allowed if the client asked for
DCERPC_PFC_FLAG_CONC_MPX in the DCERPC_BIND.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:17 +02:00
Stefan Metzmacher
a701af1d76 s4:torture/rpc: add extra_flags to torture_rpc_connection_transport()
This can be used to pass DCERPC_CONCURRENT_MULTIPLEX, which
sends DCERPC_PFC_FLAG_CONC_MPX in the DCERPC_BIND.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:17 +02:00
Günther Deschner
3487d6d78f werror: replace WERR_RPC_E_REMOTE_DISABLED with HRES_RPC_E_REMOTE_DISABLED
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:35 +02:00
Günther Deschner
5eb28d55a7 werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source4/torture/rpc/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:35 +02:00
Günther Deschner
0bba91c7a7 werror: replace WERR_FRS_INVALID_SERVICE_PARAMETER with WERR_FRS_ERR_INVALID_SERVICE_PARAMETER in source4/torture/rpc/frsapi.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:34 +02:00
Günther Deschner
f1fb2d242d werror: replace WERR_SETUP_DOMAIN_CONTROLLER with WERR_NERR_SETUPDOMAINCONTROLLER in source4/torture/rpc/wkssvc.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:32 +02:00
Günther Deschner
a8f9e8d44e werror: replace WERR_SETUP_NOT_JOINED with WERR_NERR_SETUPNOTJOINED in source4/torture/rpc/wkssvc.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:32 +02:00
Günther Deschner
3f75e34c39 werror: replace WERR_SETUP_ALREADY_JOINED with WERR_NERR_SETUPALREADYJOINED in source4/torture/rpc/wkssvc.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:30 +02:00
Günther Deschner
f7081d5ce0 werror: replace WERR_NOT_CONNECTED with WERR_NERR_USENOTFOUND in source4/torture/rpc/wkssvc.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:26 +02:00
Günther Deschner
37853aef42 werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in source4/torture/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:23 +02:00
Günther Deschner
dcdfc9937c werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source4/torture/rpc/spoolss.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:20 +02:00
Günther Deschner
329c169a09 werror: replace WERR_BADFID with WERR_INVALID_HANDLE in source4/torture/rpc/spoolss.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:18 +02:00
Günther Deschner
31ed3c0510 werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source4/torture/rpc/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:17 +02:00
Günther Deschner
fac947194b s4-torture: add new test to compare "ServerSecurityDescriptor" and GetPrinter level 3.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
b78c96d878 s4-torture: test spoolss_SetPrinter level 3 on server handle.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00