diff options
author | Volker Lendecke <vl@samba.org> | 2014-06-30 09:37:47 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-07-02 00:11:23 +0200 |
commit | 4709373cdf75d9a84eaaf1f23cf4bf07b8cb63c5 (patch) | |
tree | ba1deaaea974aaeabfd8952352f7a63ff05b9fa9 /source4 | |
parent | 0a7290ca7de4993b41c6ae54a00a2af65ec1e6c5 (diff) | |
download | samba-4709373cdf75d9a84eaaf1f23cf4bf07b8cb63c5.tar.gz |
torture: Add a check to verify MS-SMB2 3.3.5.14.2
If we have more than one lock and there is any blocking lock, we need
to fail with NT_STATUS_INVALID_PARAMETER. At a quick glance I did not
find this tested, so add it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/smb2/lock.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/torture/smb2/lock.c b/source4/torture/smb2/lock.c index a27ae9054de..1886a56134d 100644 --- a/source4/torture/smb2/lock.c +++ b/source4/torture/smb2/lock.c @@ -274,6 +274,12 @@ static bool test_valid_request(struct torture_context *torture, CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER); lck.in.lock_count = 2; + el[0].flags = SMB2_LOCK_FLAG_SHARED|SMB2_LOCK_FLAG_FAIL_IMMEDIATELY; + el[1].flags = SMB2_LOCK_FLAG_SHARED; + status = smb2_lock(tree, &lck); + CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER); + + lck.in.lock_count = 2; el[0].flags = 0; el[1].flags = 0; status = smb2_lock(tree, &lck); |