summaryrefslogtreecommitdiffstats
path: root/source4/torture
Commit message (Collapse)AuthorAgeFilesLines
...
* s4:torture/rpc: remove compiler warnings in spoolss_notify.cStefan Metzmacher2014-01-161-1/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: s/pipe/pipes/Stefan Metzmacher2014-01-161-4/+4
| | | | | | | pipe(2) is a system call. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: remove unused variables from alter_context.cStefan Metzmacher2014-01-161-5/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: avoid using dcerpc_event_context()Stefan Metzmacher2014-01-162-4/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: avoid usage of p->conn->event_ctxStefan Metzmacher2014-01-161-1/+1
| | | | | | | | | | | torture_suite_add_rpc_iface_tcase() uses tctx->ev, which means p->conn->event_ctx and tctx->ev are the same. As we want to get rid of per connection tevent_context pointers, we should use tctx->ev. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/libnet: remove bogus usage of p->conn->event_ctxStefan Metzmacher2014-01-161-7/+0
| | | | | | | | ctx->event_ctx and p->conn->event_ctx already have the same value as torture->ev. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_usermod() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-1/+1
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_userdel() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-1/+3
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_useradd() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-1/+1
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_useradd_send() take ↵Stefan Metzmacher2014-01-161-1/+2
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_userinfo() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-162-3/+5
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_userinfo_send() take ↵Stefan Metzmacher2014-01-161-2/+4
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_groupadd() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-3/+7
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_groupinfo() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-2/+4
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture:spoolss_win: fix valgrind problem in test_EnumJobs()Stefan Metzmacher2014-01-071-0/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:torture:smb2: add new durable-v2-open.reopen1a testMichael Adam2013-12-061-0/+110
| | | | | | | | | | | | | | | - open session1 on tcp connection conn1 - open a durable handle on a session1 - do a session reconnect on a new tcp connection conn2 - doing a durable reconnect on session1 gives USER_SESSION_DELETED - doing a durable reconnect on session2 succeeds Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Dec 6 15:59:15 CET 2013 on sn-devel-104
* s4:torture:smb2: add new durable-open.reopen1a testMichael Adam2013-12-061-0/+100
| | | | | | | | | | | | - open session1 on tcp connection conn1 - open a durable handle on a session1 - do a session reconnect on a new tcp connection conn2 - doing a durable reconnect on session1 gives USER_SESSION_DELETED - doing a durable reconnect on session2 succeeds Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4-torture: Use talloc for asprintf.Andreas Schneider2013-12-061-12/+10
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-torture: Fix out of bound array access.Andreas Schneider2013-12-061-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3-torture: Comment out dead code in spoolss test.Andreas Schneider2013-12-061-1/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-torture: Fix some compile warnings in spoolss.Andreas Schneider2013-12-061-5/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-torture: Make sure handles are correctly initialized.Andreas Schneider2013-12-061-1/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-torture: Make sure the handles are initialized correctly.Andreas Schneider2013-12-061-1/+4
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-torture: Make sure the handles are not used uninitialized.Andreas Schneider2013-12-061-1/+7
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* torture: match Windows responses to bad shadow copy IDsDavid Disseldorp2013-12-061-3/+3
| | | | | | | | test_fsrvp_bad_id() issues DeleteShareMapping requests with invalid shadow copy IDs, expect Windows Server 2012 return codes. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* torture: test duplicate shares in FSRVP shadow-copy setDavid Disseldorp2013-12-061-12/+25
| | | | | | | | MS-FSRVP 3.1.4.4 documents the requirement for failure when duplicate volume names are encountered on AddToShadowCopySet. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbtorture: New torture test for bug #9870.Jeremy Allison2013-12-051-0/+95
| | | | | | | | | | | | | | | Not fetching the latest modification time on a folder if we have read locks on it. Prove we should just rely on the mtime value from the underlying filesystem, even with an open handle. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9870 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Dec 5 10:05:06 CET 2013 on sn-devel-104
* torture: enum snapshots after FSRVP creationDavid Disseldorp2013-12-051-2/+100
| | | | | | | | | | | Issue an SMB2 ENUM_SNAPSHOTS ioctl following FSRVP snapshot creation to cover Explorer previous file version use-cases. This test will fail against Windows Server 2012, as FSRVP created snapshots are not exposed via the ENUM_SNAPSHOTS ioctl. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* torture: test get/set compression ioctl permissionsDavid Disseldorp2013-11-221-0/+128
| | | | | | | | | | | | | Windows Server 2012[r2] exhibits some strange behaviour with regard to handling the compression fsctls. [READ/WRITE]_ATTR permissions are not required for the corresponding get/set compression ioctls. WRITE_DATA is required for set compression. 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 Nov 22 19:57:48 CET 2013 on sn-devel-104
* torture: split open from test_setup_create_fillDavid Disseldorp2013-11-221-12/+32
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: attempt to set compression via SetInfoDavid Disseldorp2013-11-221-2/+101
| | | | | | | | Doing so should give a successful SetInfo response, however the attribute should not be set in subsequent GetInfo / ioctl responses. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: test dir non-inherit in compress_inherit_disableDavid Disseldorp2013-11-221-8/+35
| | | | | | | | | | | Also add a note reguarding Windows 2008GM copy-chunk note: Windows 2008GM (non-R2) fails the copy-chunk src=dest overlap test, as it appears to use a different chunk copy algorithm to 208R2. Takeaway advice is to avoid using copy-chunk when the source and destination ranges overlap in the same file. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: test printing using "XPS_PASS" datatypeArvid Requate2013-11-211-3/+30
| | | | | | | | | | | | The "XPS_PASS" datatype is used by Windows 8. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10267 Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Nov 21 15:01:30 CET 2013 on sn-devel-104
* docs: remove duplicate mention of "smbtorture" in smbtorture manpage.Günther Deschner2013-11-191-4/+0
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: Relax time checking in CHECK_NTTIME.Andreas Schneider2013-11-122-2/+2
| | | | | | | | | NTTIME has a nanosecond resolution. We should be tolerate if the system is busy writing and reading the value. To reproduce this problem just run the test under valgrind. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4:torture/netlogon: Test netlogon with additional attrsBenjamin Franzke2013-11-121-0/+83
| | | | | | | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com> se enter the commit message for your changes. Lines starting Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Nov 12 00:57:19 CET 2013 on sn-devel-104
* s4:torture/ldap: Add test for netlogon over tcpBenjamin Franzke2013-11-114-330/+519
| | | | | | | | | | | | | | | This patch moves the udp netlogon tests from cldap.c to netlogon.c and passes a generic netlogon-send function as parameter. Therefore a tcp replacement for cldap_netlogon is also added. The two variants tcp and udp are added as 2 new torture tests: ldap.netlogon-udp & ldap.netlogon-tcp Both tests succeed. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
* s4:torture/cldap: Fix a typoBenjamin Franzke2013-11-111-1/+1
| | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
* s4:torture:smb2: add new lease.upgrade3 test to test the contended upgradeMichael Adam2013-11-111-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test what upgrades work when there is another lease already held, in addition to the lease to be upgraded. The summary of the behaviour is this: ------------------------------------- If we have two leases (lease1 and lease2) on the same file, then attempt to upgrade lease1 results in a change if and only if the requested lease state: - is valid, - is strictly a superset of lease1, and - can held together with lease2. In that case, the resuling lease state of the upgraded lease1 is the state requested in the upgrade. lease2 is not broken and remains unchanged. Note that this contrasts the case of directly opening with an initial requested lease state, in which case you get that portion of the requested state that can be shared with the already existing leases (or the states that they get broken to). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Nov 11 18:04:47 CET 2013 on sn-devel-104
* s4:torture:smb2: add comment explaining lease upgrade in the non-contended caseMichael Adam2013-11-111-0/+11
| | | | | | | | | | | | | | | The summary of the behaviour is this: ------------------------------------- An uncontended lease upgrade results in a change if and only if the requested lease state is - valid, and - strictly a superset of the lease state already held. In that case the resulting lease state is the one requested in the upgrade. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* Add regression test for bug #10229 - No access check verification on stream ↵Jeremy Allison2013-11-041-0/+181
| | | | | | | | | | | | | | files. Checks against a file with attribute READONLY, and a security descriptor denying WRITE_DATA access. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Nov 4 23:10:10 CET 2013 on sn-devel-104
* torture: Add smb2.rename.rename_dir_benchVolker Lendecke2013-11-041-0/+375
| | | | | | | | | This is a little benchmark test excercising parallel directory renames. With lots of open files directory renames get pretty slow against some SMB server implementations. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: add FSCTL_SRV_COPYCHUNK_WRITE access testDavid Disseldorp2013-10-251-2/+51
| | | | | | | | | | | Check that FSCTL_SRV_COPYCHUNK_WRITE succeeds when the copy-chunk target is opened with SEC_RIGHTS_FILE_WRITE only. 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 Oct 25 22:48:59 CEST 2013 on sn-devel-104
* torture: Add smb2.oplock.levelII501 testVolker Lendecke2013-10-241-1/+256
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Thu Oct 24 16:15:50 CEST 2013 on sn-devel-104
* torture: Extend the raw.oplock.level_ii_1 testVolker Lendecke2013-10-231-0/+14
| | | | | | | | | | | | | | smbd broke to none twice. Make sure this won't happen again :-) This used to happen before the MSG_SMB_BREAK_RESPONSE merge. In process_oplock_break_message we did not call remove_oplock, which would have prevented this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Oct 23 14:06:13 CEST 2013 on sn-devel-104
* torture: Add a test showing we have to break L2 at open timeVolker Lendecke2013-10-231-0/+105
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: Add oplock break to l2/none testsVolker Lendecke2013-10-232-0/+179
| | | | | | | | | The level we have to break to depends on the create disposition of the second opener. If it's overwriting, break to none. If it's not, break to level2. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: Check break level in raw.oplock.exclusive5Volker Lendecke2013-10-231-0/+1
| | | | | | | | | | This is what Windows does in this case, we don't survive that. We break to LEVEL2 here. Fixes and more precise test to follow. We don't survive this anymore. Re-enable later. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: Add reproducer for bug 10216Volker Lendecke2013-10-231-0/+12
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:tortore:raw/qfileinfo: don't use dcerpc_pipe_open_smb() to open a named pipeStefan Metzmacher2013-10-171-12/+29
| | | | | | | | | | | We can directly use smb_raw_open() to open a handle to a named pipe. This avoids the need for the layer violation functions dcerpc_smb_tree() and dcerpc_smb_fnum(). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>