summaryrefslogtreecommitdiffstats
path: root/source4/torture/smb2/lock.c
Commit message (Collapse)AuthorAgeFilesLines
* s4:torture/smb2: accept NT_STATUS_RANGE_NOT_LOCKED after smb2_logoff/tdisStefan Metzmacher2014-03-121-11/+13
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/smb2: remove unused smb2_session->pidStefan Metzmacher2012-07-251-4/+0
| | | | metze
* s4:torture/smb2: use tctx->ev as event context for pollingStefan Metzmacher2011-11-241-1/+1
| | | | metze
* s4:torture/smb2/lock: remove samba4 specific checks for ↵Stefan Metzmacher2011-09-281-12/+14
| | | | | | | | | | | | | | NETWORK_NAME_DELETED/USER_SESSION_DELETED Most Windows versions have a strange order to verify the session id, tree id and file id. (They should be checked in that order, but windows seems to check the file id before the others). metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Sep 28 21:12:07 CEST 2011 on sn-devel-104
* torture: use tevent_ functions names instead of the legacy event_ onesSimo Sorce2011-08-131-1/+1
|
* s4:torture/smb2: s/smb2cli_unlock/test_smb2_unlockStefan Metzmacher2011-07-061-3/+3
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Jul 6 19:07:42 CEST 2011 on sn-devel-104
* s4:torture/smb2: s/smb2cli_lock/test_smb2_lockStefan Metzmacher2011-07-061-19/+19
| | | | metze
* s4-smbtorture: Make test names lowercase and dot-separated.Jelmer Vernooij2010-12-111-22/+22
| | | | | | | | This is consistent with the test names used by selftest, should make the names less confusing and easier to integrate with other tools. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
* s4:torture - suppress printf "%llu" on uint64_t variables warningsMatthias Dieter Wallnöfer2010-11-011-16/+20
| | | | | | The signed/unsignedness does match (always unsigned). The bitlength (64 bit) on all regular platforms does also. Therefore simply add a cast to "unsigned long long".
* s4/torture: add test for zero byte read contention with byte range locksSteven Danneman2009-12-071-0/+120
|
* s4/torture: fix >80 column spacing issuesSteven Danneman2009-12-071-6/+6
|
* s4/torture: add addition multiple lock testsSteven Danneman2009-12-021-29/+212
| | | | | | | | * test that 2 locks in a single LockAndX are transactional * test that 1 unlock and 1 lock in a single LockAndX are not transactional * test that SMB2 doesn't like mixed lock/unlock in a single PDU
* s4-torture: fixed error code for s4 in SMB2-LOCK testAndrew Tridgell2009-11-271-1/+8
| | | | | | | s4 returns NETWORK_NAME_DELETED if you attempt to use an invalid tree connection for a lock. This test (correctly I think) happens before we validate the file handle. That implies that when you pass both a closed handle and a invalid tree you should get NT_STATUS_NETWORK_NAME_DELETED.
* s4-torture: fixed expected error codes for s4 in SMB2-LOCKAndrew Tridgell2009-11-271-3/+22
| | | | | | | | I think the error/success codes returned by windows for these tests are quite bogus. The ones s4 gives are much more reasonable. The locking ones returning NT_STATUS_SUCCESS could lead to data loss, as an application thinks it has a file locked correctly when it fact it doesn't, so it could do an unsafe modify.
* torture: fixed SMB2-LOCK valgrind errorAndrew Tridgell2009-11-271-1/+2
|
* s4/torture: port SMBv1 RAW-LOCK tests to SMBv2Steven Danneman2009-11-251-20/+2012
| | | | | | | | | | | | | | | | | | | | | | | | RAW-LOCK ported as: RAW-LOCK-LOCK, RAW-LOCK-LOCKX -> SMB2-LOCK-LOCK RAW-PIDHIGH -> removed, no longer relevant RAW-ASYNC -> SMB2-LOCK-ASYNC, SMB2-LOCK-CANCEL, SMB2-LOCK-CANCEL-TDIS, SMB2-LOCK-CANCEL-LOGOFF RAW-ERRORCODE -> SMB2-LOCK-ERRORCODE RAW-CHANGETYPE -> removed, no longer relevant RAW-ZEROBYTELOCKS -> SMB2-LOCK->ZEROBYTELENGTH RAW-UNLOCK -> SMB2-LOCK-UNLOCK RAW-MULTIPLE_UNLOCK -> SMB2-LOCK-MULTIPLE-UNLOCK RAW-STACKING -> SMB2-LOCK-STACKING BASE-LOCK ported as: BASE-LOCK-LOCK1 -> SMB2-LOCK-ERRORCODE, timeout is no longer relevant BASE-LOCK-LOCK2 -> SMB2-LOCK-CONTEND, SMB2-LOCK-LOCK, SMB2-LOCK-CONTEXT BASE-LOCK-LOCK3 -> SMB2-LOCK-RANGE BASE-LOCK-LOCK4 -> SMB2-LOCK-OVERLAP BASE-LOCK-LOCK5 -> SMB2-LOCK-STACKING BASE-LOCK-LOCK6 -> SMB2-LOCK-CANCEL, change_locktype no longer relevant BASE-LOCK-LOCK7 -> SMB2-LOCK-RW-SHARED, SMB2-LOCK-RW-EXCLUSIVE
* s4/libcli: rename previously reserved field in SMB2 LOCK structSteven Danneman2009-11-251-13/+13
| | | | | The lock.in.reserved field has been renamed lock_sequence in the SMB 2.1 dialect. See MS-SMB 2.2.26.
* SMB2-LOCK: make use of torture_assert_*()Stefan Metzmacher2009-11-181-12/+6
| | | | | | This is needed in order to mark tests as known failures. metze
* torture/smb2: make SMB2 BRL tests pass against W2K8R2Steven Danneman2009-11-171-100/+101
| | | | | | | | | | | | | | | The BRL tests previously based their results off several bugs in the W2K8 byte range lock code. I've fixed up the tests to pass against Win7 which has fixed these bugs, and assume that the Win7 behavior is the default. I have inverted the test behavior for >63-bit lock requests. The tests previously expected NT_STATUS_OK as their default in this case. I've changed that default to expect STATUS_INVALID_LOCK_RANGE. This may requires some changing of make test to compensate. I've also removed a few test scenarios from VALID-REQUEST in preparation of replacing them with separate tests ported from RAW-LOCK.
* s4-torture: ran minimal_includes.pl over source4/tortureAndrew Tridgell2009-10-201-1/+0
| | | | This reduces compile time somewhat.
* SMB2-LOCK: let the test pass against samba4Stefan Metzmacher2009-05-201-1/+7
| | | | metze
* s/NT_STATUS_WIN7_INVALID_RANGE/NT_STATUS_INVALID_LOCK_RANGE/gZach Loafman2009-04-011-5/+5
|
* s4 torture: Add a string version for NT_STATUS_WIN7_INVALID_RANGEZach Loafman2009-03-171-10/+29
| | | | | | Also submitted a request to cifs-protocol for a real name for this thing. Use win7 target logic in smb2 lock test, SMB2-LOCK now passes against Win7.
* another SMB2-LOCK fix now that we know that the UNLOCK flag is onlyAndrew Tridgell2008-06-041-5/+1
| | | | | honoured on the first lock in a set (This used to be commit c014ffabc65c30a6b83c8f9f9f9a80bb79333f59)
* fixed SMB2-LOCK test for new semantics (from docs)Andrew Tridgell2008-06-041-5/+1
| | | | (This used to be commit d4d4d62939e325f8529b11fcd2d490e8f63293b0)
* don't emulate broken SMB2 locking behaviour from windowsAndrew Tridgell2008-05-301-4/+66
| | | | (This used to be commit c50e7a15f9a7f2c5821b5ee468f9ade6eaa0ed55)
* add exceptions for some of the strange windows SMB2 locking behaviourAndrew Tridgell2008-05-281-2/+10
| | | | (This used to be commit 429bbecebe50ce3d8d494eece35b2387556d5893)
* re-enable some testsAndrew Tridgell2008-05-271-3/+3
| | | | (This used to be commit c15b24a2f4346b6f07e1d5fd4f2bef7cd09cf350)
* enforce lock ordering in SMB2Andrew Tridgell2008-05-271-4/+70
| | | | (This used to be commit 3bec932a89006521ba74bde7943b8cd5b4a660d8)
* added some SMB2 locking tests from gentestAndrew Tridgell2008-05-271-0/+30
| | | | (This used to be commit 2932fcb04646bb921fb1daa365dd4c86cadfe4c0)
* fixes to the SMB2 lock test after recent SMB2 locking changesAndrew Tridgell2008-05-221-8/+12
| | | | (This used to be commit de7626e1c29f04e54afb6d95f4051bc52b17dd80)
* fixed SMB2 lockingAndrew Tridgell2008-05-211-71/+77
| | | | | | | | | - SMB2 locking is different in several ways from SMB locking. To fix it properly we will need a new generic mapping structure for locking, but for now do a best effort mapping - added locking to gentest_smb2 (This used to be commit ea6d9cf602302adafe0f9d5f5f90a9b26d1ead6f)
* updated SMB2 create operation to match WSPP.Andrew Tridgell2008-02-131-4/+4
| | | | | Adding some defined for various new create options (This used to be commit d037dc23ced3df6bce98cbf4810fb5f1247336bd)
* r25554: Convert last instances of BOOL, True and False to the standard types.Jelmer Vernooij2007-10-101-9/+9
| | | | (This used to be commit 566aa14139510788548a874e9213d91317f83ca9)
* r23792: convert Samba4 to GPLv3Andrew Tridgell2007-10-101-3/+2
| | | | | | There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
* r22858: - let SMB2-LOCK-VALID-REQUEST pass against longhorn beta3Stefan Metzmacher2007-10-101-25/+92
| | | | | | | | | - add modify the SMB2-LOCK-BLOCK-WRITE test to also test reading and name in SMB2-LOCK-RW-EXCLUSIV - add SMB2-LOCK-NONE and SMB2-LOCK-SHARED metze (This used to be commit 258555975d3877cff3bc3022f3439cdd61f6c8ac)
* r22824: - add a simple test which shows how a lock rejectsStefan Metzmacher2007-10-101-11/+107
| | | | | | | | | | a write on a different file handle. SMB2-LOCK-BLOCK-WRITE - make it possible to run each SMB2-LOCK-* test on its own metze (This used to be commit 9c02f690bc07ebf99cb272e255a24d7061d8e730)
* r16951: add the year to the copyright...Stefan Metzmacher2007-10-101-1/+1
| | | | | metze (This used to be commit 97157d5c4a829108f1da89b23b91a6cf87879b3a)
* r16738: vista beta2 use FILE_CLOSED as error for an invalid file handleStefan Metzmacher2007-10-101-1/+1
| | | | | metze (This used to be commit fa35ddcaf9bbeaa4780aa3497cdff56b02af0ab9)
* r15816: add SMB2-LOCK torture test, which demonstrates what possible valid ↵Stefan Metzmacher2007-10-101-0/+215
and invalid requests you can do with it metze (This used to be commit adef1372c118b6c116dfa976d0277be677118fd0)