summaryrefslogtreecommitdiff
path: root/source4/torture/smb2
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-28 12:05:23 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-28 12:05:23 +1000
commit17704a8df644b8b96aa61ebd69e9a6bdaee38146 (patch)
tree87fdc1563b8dfad640498754dfa041c118818d5e /source4/torture/smb2
parentfd67526bd304dd9391b0014886dd2748aa392721 (diff)
downloadsamba-17704a8df644b8b96aa61ebd69e9a6bdaee38146.tar.gz
samba-17704a8df644b8b96aa61ebd69e9a6bdaee38146.tar.bz2
samba-17704a8df644b8b96aa61ebd69e9a6bdaee38146.zip
add exceptions for some of the strange windows SMB2 locking behaviour
(This used to be commit 429bbecebe50ce3d8d494eece35b2387556d5893)
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r--source4/torture/smb2/lock.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/torture/smb2/lock.c b/source4/torture/smb2/lock.c
index 4e21045a33..5a36ac3eae 100644
--- a/source4/torture/smb2/lock.c
+++ b/source4/torture/smb2/lock.c
@@ -252,12 +252,20 @@ static bool test_valid_request(struct torture_context *torture, struct smb2_tree
lck.in.lock_count = 1;
el[0].flags = SMB2_LOCK_FLAG_UNLOCK;
status = smb2_lock(tree, &lck);
- CHECK_STATUS(status, NT_STATUS_OK);
+ if (torture_setting_bool(torture, "windows", false)) {
+ CHECK_STATUS(status, NT_STATUS_RANGE_NOT_LOCKED);
+ } else {
+ CHECK_STATUS(status, NT_STATUS_OK);
+ }
lck.in.lock_count = 1;
el[0].flags = SMB2_LOCK_FLAG_UNLOCK;
status = smb2_lock(tree, &lck);
- CHECK_STATUS(status, NT_STATUS_OK);
+ if (torture_setting_bool(torture, "windows", false)) {
+ CHECK_STATUS(status, NT_STATUS_RANGE_NOT_LOCKED);
+ } else {
+ CHECK_STATUS(status, NT_STATUS_OK);
+ }
lck.in.lock_count = 1;
el[0].flags = SMB2_LOCK_FLAG_UNLOCK;