summaryrefslogtreecommitdiff
path: root/source4/torture/smb2
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-11-08 18:48:25 +0100
committerMichael Adam <obnox@samba.org>2011-11-09 01:02:08 +0100
commitcda10063abe73c2605f8396dca6cbe1fe2554bc3 (patch)
tree775c2547eca9100a16957b98924d3911f50c9c55 /source4/torture/smb2
parent5d3b6aa674618e62e238cd6bac16b6e3ddaebebb (diff)
downloadsamba-cda10063abe73c2605f8396dca6cbe1fe2554bc3.tar.gz
samba-cda10063abe73c2605f8396dca6cbe1fe2554bc3.tar.bz2
samba-cda10063abe73c2605f8396dca6cbe1fe2554bc3.zip
s4:torture:smb2: rewrite the durable-open.oplock test to use smb2_oplock_create()
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r--source4/torture/smb2/durable_open.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/source4/torture/smb2/durable_open.c b/source4/torture/smb2/durable_open.c
index d3657997df..57718e457f 100644
--- a/source4/torture/smb2/durable_open.c
+++ b/source4/torture/smb2/durable_open.c
@@ -447,27 +447,11 @@ bool test_durable_open_oplock(struct torture_context *tctx,
smb2_util_unlink(tree1, fname);
/* Create with batch oplock */
- ZERO_STRUCT(io1);
- io1.in.security_flags = 0x00;
- io1.in.oplock_level = SMB2_OPLOCK_LEVEL_BATCH;
- io1.in.impersonation_level = NTCREATEX_IMPERSONATION_IMPERSONATION;
- io1.in.create_flags = 0x00000000;
- io1.in.reserved = 0x00000000;
- io1.in.desired_access = SEC_RIGHTS_FILE_ALL;
- io1.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
- io1.in.share_access = NTCREATEX_SHARE_ACCESS_READ |
- NTCREATEX_SHARE_ACCESS_WRITE |
- NTCREATEX_SHARE_ACCESS_DELETE;
- io1.in.create_disposition = NTCREATEX_DISP_OPEN_IF;
- io1.in.create_options = NTCREATEX_OPTIONS_SEQUENTIAL_ONLY |
- NTCREATEX_OPTIONS_ASYNC_ALERT |
- NTCREATEX_OPTIONS_NON_DIRECTORY_FILE |
- 0x00200000;
- io1.in.fname = fname;
- io1.in.durable_open = true;
+ smb2_oplock_create(&io1, fname, SMB2_OPLOCK_LEVEL_BATCH);
+ io1.in.durable_open = true;
io2 = io1;
- io2.in.create_disposition = NTCREATEX_DISP_OPEN;
+ io2.in.create_disposition = NTCREATEX_DISP_OPEN;
status = smb2_create(tree1, mem_ctx, &io1);
CHECK_STATUS(status, NT_STATUS_OK);