summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-11-08 18:44:54 +0100
committerMichael Adam <obnox@samba.org>2011-11-09 01:02:08 +0100
commit5d3b6aa674618e62e238cd6bac16b6e3ddaebebb (patch)
tree059b9071fcb97ce5bcabe7b50d7652da65b7cab2 /source4
parent6e721fdd43dbae8a558dca3dbbc34fed2b163f82 (diff)
downloadsamba-5d3b6aa674618e62e238cd6bac16b6e3ddaebebb.tar.gz
samba-5d3b6aa674618e62e238cd6bac16b6e3ddaebebb.tar.bz2
samba-5d3b6aa674618e62e238cd6bac16b6e3ddaebebb.zip
s4:torture:smb2: rewrite the durable-open.file-position test to use smb2_oplock_create()
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/smb2/durable_open.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/source4/torture/smb2/durable_open.c b/source4/torture/smb2/durable_open.c
index eb01a71982..d3657997df 100644
--- a/source4/torture/smb2/durable_open.c
+++ b/source4/torture/smb2/durable_open.c
@@ -339,24 +339,8 @@ bool test_durable_open_file_position(struct torture_context *tctx,
smb2_util_unlink(tree1, fname);
- 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.durable_open = true;
- io1.in.fname = fname;
+ smb2_oplock_create(&io1, fname, SMB2_OPLOCK_LEVEL_BATCH);
+ io1.in.durable_open = true;
status = smb2_create(tree1, mem_ctx, &io1);
CHECK_STATUS(status, NT_STATUS_OK);