summaryrefslogtreecommitdiffstats
path: root/source4/torture
Commit message (Collapse)AuthorAgeFilesLines
...
* s4:torture/samba3rpc: let rpc.authcontext be more robust against low level ↵Stefan Metzmacher2013-10-171-7/+15
| | | | | | | | | | | | | | | | | changes (part2) We now use smbXcli_conn_is_connected() and dcerpc_binding_handle_is_connected() to verify only the dcerpc layer got an error. The expected error is EIO mapped to NT_STATUS_IO_DEVICE_ERROR. NT_STATUS_INVALID_HANDLE should only be visible at the SMB layer, but we keep this as allowed return value for now, until the dcerpc layer is fixed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture/samba3rpc: let rpc.authcontext be more robust against low level ↵Stefan Metzmacher2013-10-171-0/+4
| | | | | | | | | | | | | code changes (part1) Some code uses the low level smbXcli_session structure instead of the smbcli_session structure and doesn't 'see' updates to the smbcli_session structure. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture: add smb2.session.reauth6 : test failing reauthMichael Adam2013-10-151-0/+103
| | | | | | | | | | | | | | | This attempts reauth with invalid creds, hence triggering the error path in the reauth code. This invalidates the session and subsequente requests on that connection fail. https://bugzilla.samba.org/show_bug.cgi?id=10208 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Oct 15 22:50:27 CEST 2013 on sn-devel-104
* torture: Extend raw.oplock.batch10Volker Lendecke2013-10-151-0/+12
| | | | | | | | | | With FAKE_LEVEL_II_OPLOCKS around we did not grant LEVEL2 after a NO_OPLOCK file got written to. Windows does grant LEVEL2 in this case. With the have_level2_oplocks in brlocks.tdb we can now grant LEVEL2 in this case as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Extend the smb2.oplock.doc1 testVolker Lendecke2013-10-111-6/+28
| | | | | | | If delete_on_close is set, there is no oplock break. Check that. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Extend the raw.oplock.doc1 testVolker Lendecke2013-10-111-7/+21
| | | | | | | If delete_on_close is set, there is no oplock break. Check that. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Remove an unused variableVolker Lendecke2013-10-061-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: Continue buffer check after NOT_IMPLEMENTED infolevelsVolker Lendecke2013-10-061-0/+3
| | | | | | | | | Patch from the SDC plugfest. Not every implementation supports every infolevel, and we want to be able to test buffersize error behaviour for all supported infolevels Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: Fix a typoVolker Lendecke2013-10-061-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: add durable-v2-open.reopen2cMichael Adam2013-10-051-0/+75
| | | | | | | | | | - create durable with v1 request - reconnect with v2 reconnect request ==> fails Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: add durable-v2-open.reopen2bMichael Adam2013-10-051-0/+91
| | | | | | | | | | - connect with durable v2 - reconnect with durable v1 => succeeds Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: add durable-v2-open.create-blobMichael Adam2013-10-051-0/+108
| | | | | | | | | | | test various combinations of durable create and reconnect request blobs, according to MS-SMB2, 3.3.5.9.12: "Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 Create Context" Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: extend the durable-open.reopen2 testMichael Adam2013-10-051-18/+83
| | | | | | | | | | Add tests for: - filename and many other things don't matter in reconnect - additionally specified DHnQ request blob is ignored. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: extend the durable-v2-open.reopen2 testMichael Adam2013-10-051-4/+44
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: add a durable-open.reopen-lease-v2 testMichael Adam2013-10-051-0/+238
| | | | | | | | like durable-open.reopen2-lease but with v2 lease requets Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: add durable-v2-open.reopen2-lease-v2Michael Adam2013-10-051-0/+245
| | | | | | | | | lease v2 variant of the reopen2 test. Test various success and failure cases. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: add smb2_lease_v2_create() wrapper to ↵Michael Adam2013-10-051-0/+16
| | | | | | | | | | smb2_lease_v2_create_share() that sets share all. similar to smb2_lease_create() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: add durable-v2-open.reopen2-leaseMichael Adam2013-10-051-0/+247
| | | | | | | | lease v1 variant of the reopen2 test Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: add durable-open.reopen2-lease testMichael Adam2013-10-051-0/+238
| | | | | | | | lease-variant of the reopen2 test Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: fix durable-open lease tests to pass against windows.Michael Adam2013-10-051-2/+8
| | | | | | | | Fix is: reconnect with same client-guid as on the first connection. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture:smb2: add smbcli_options argument to torture_smb2_connection_ext()Michael Adam2013-10-053-13/+46
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture:spoolss: use smb2_connect() instead of smb2_connet_ext()Michael Adam2013-10-051-12/+11
| | | | | | | | in print_test_smbd: we don't need to pass the previous_session_id. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: fix a comment in the durable-open.lock-oplock testMichael Adam2013-10-051-1/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:ldap: Fix misleading outputHoward Chu2013-09-231-2/+2
| | | | | | | | | | | Looks like an errant copy/paste from the Abandon test. Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Sep 23 22:47:50 CEST 2013 on sn-devel-104
* s4:torture: remove and useless variable and assignment in smb2.session.reauth5Michael Adam2013-09-211-3/+1
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Sep 21 08:00:02 CEST 2013 on sn-devel-104
* smbd: Remove FORCE_OPLOCK_BREAK_TO_NONEVolker Lendecke2013-09-061-0/+3
| | | | | | | | | | | | | | | This flag existed to break an exclusive or batch oplock in just one instead of two steps down to "no oplock" when we did an allocation or file size change. Running raw.oplock against W2k12 differs in this respect from W2k3: W2k12 takes two steps (via level2) to break to none. This removes the special flag that we only had for compatibility with systems older than W2k12... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep 6 00:47:07 CEST 2013 on sn-devel-104
* torture: Adapt raw.oplock to w2k12Volker Lendecke2013-09-051-6/+18
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Add a new w2k12 targetVolker Lendecke2013-09-052-0/+3
| | | | | | | | W2k12 seems to do the 2-step break to none, try running raw.oplock.batch12 against it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Ensure that GSSAPI and SPNEGO packets are accepted by dlz_bind9Andrew Bartlett2013-09-042-0/+79
| | | | | | | | | | | | | | This exercises some more of the dlz_bind9 code outside BIND, by sending in a ticket to be access checked, wrapped either in SPNEGO or just in GSSAPI. Andrew Bartlett 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 Sep 4 11:25:10 CEST 2013 on sn-devel-104
* torture: Add buffercheck testsVolker Lendecke2013-08-291-18/+226
| | | | | | | | | | | | | Make sure we get the smb2 infolevel fixed portions right I could not find correct #defines for the infolevels Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Aug 29 01:27:11 CEST 2013 on sn-devel-104
* torture: Split the fsinfo check into a separate testVolker Lendecke2013-08-231-2/+8
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 23 20:53:12 CEST 2013 on sn-devel-104
* torture: Split the buffercheck into a separate testVolker Lendecke2013-08-231-2/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Change smb2.getinfo into a suiteVolker Lendecke2013-08-232-2/+11
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb2: Fix opening the rootdirectory, part 2Volker Lendecke2013-08-231-1/+1
| | | | | | | | | | | | | | | smb2_push_o16s16_blob is wrong for the blob.data==NULL case. It does not do the same magic that the rest of the routine does with regards to padding_fix. padding_fix is wrong in its own respect, with a 0-length blob we end up with a negative padding fix. It's wrong, but it seems to work. Why am I doing this? I want to make smb2.getinfo work against w2k12. smb2_util_roothandle() always gives NT_STATUS_INVALID_PARAMETER without this and the preceding fix. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Remove an unused variableVolker Lendecke2013-08-231-3/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: support Windows 2k8 response for compress_invalid_bufDavid Disseldorp2013-08-151-4/+6
| | | | | | | | | Windows Server 2012 returns NT_STATUS_INVALID_USER_BUFFER, Windows Server 2008r2 returns NT_STATUS_INVALID_PARAMETER. Don't fail the test if either status is returned. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: add more [no-]compress-on-open ioctl testsDavid Disseldorp2013-08-151-1/+144
| | | | | | | | | | | | compress_create_with_attr: Specifies the FILE_ATTRIBUTE_COMPRESSED attribute at create time, then checks the created file. compress_inherit_disable: Creates under a compressed directory, a file with the NTCREATEX_OPTIONS_NO_COMPRESSION option. Then checks that the newly created file doesn't inherit the parent compression state. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: add file_attribs arg to file create helperDavid Disseldorp2013-08-151-24/+23
| | | | | | | Allows for the testing of file creation with FILE_ATTRIBUTE_COMPRESSED. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: add compressed file attribute ioctl testDavid Disseldorp2013-08-151-0/+53
| | | | | | | | After marking a file for compression via FSCTL_SET_COMPRESSION, the FILE_ATTRIBUTE_COMPRESSED flag should be present. Test for this. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: check for filesystem compression capabilityDavid Disseldorp2013-08-151-18/+59
| | | | | | | | | Only run the compression tests if the compression capability is returned by the server in response to an SMB2_QUERY_INFO(FS attribute info) request. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: extend FSCTL_[GET/SET]_COMPRESSION testsDavid Disseldorp2013-08-151-39/+234
| | | | | | | | Check for inheritance of compression attributes from parent directories. Also, test error handling for invalid requests. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/rpc: s/getgroups/getgr to avoid compiler warningsStefan Metzmacher2013-08-121-5/+5
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture/rpc/samsync: avoid talloc_reference()Stefan Metzmacher2013-08-121-14/+13
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* auth/gensec: introduce gensec_internal.hStefan Metzmacher2013-08-101-0/+1
| | | | | | | | | | We should treat most gensec related structures private. It's a long way, but this is a start. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture: avoid usage of dcerpc_schannel_creds()Stefan Metzmacher2013-08-104-17/+11
| | | | | | | | | | We use cli_credentials_get_netlogon_creds() which returns the same value. dcerpc_schannel_creds() is a layer violation. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture: add smb2 FSCTL_[GET/SET]_COMPRESSION testDavid Disseldorp2013-08-091-0/+84
| | | | | | | | | | | | | | | | | | This test simply creates a file and checks the compression state before and after FSCTL_SET_COMPRESSION(COMPRESSION_FORMAT_DEFAULT). The test expects the compression state to be COMPRESSION_FORMAT_LZNT1 after set, conforming to Windows Server behaviour. If the server responds to the first FSCTL_GET_COMPRESSION request with NT_STATUS_NOT_SUPPORTED or NT_STATUS_INVALID_DEVICE_REQUEST, then the test is skipped. This allows it to run during selftest. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 9 22:03:39 CEST 2013 on sn-devel-104
* torture: split out ioctl test file creation helperDavid Disseldorp2013-08-091-56/+43
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* drs-cracknames: Add some debugs in the torture to know better which test has ↵Matthieu Patou2013-08-071-0/+4
| | | | | | | | | | failed Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-By: Andrew Bartlett <abarlett@samba.org> Autobuild-User(master): Matthieu Patou <mat@samba.org> Autobuild-Date(master): Wed Aug 7 08:10:58 CEST 2013 on sn-devel-104
* torture: Quiet a warning about set but not used variableMatthieu Patou2013-08-061-8/+7
| | | | | Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-By: Andrew Bartlett <abarlett@samba.org>
* torture-drsuapi: Make the name of the dc variableMatthieu Patou2013-08-061-3/+5
| | | | | | | In case some tests fails or if the removal takes sometime to replicate to all the DCs Reviewed-By: Andrew Bartlett <abarlett@samba.org>