From 5d3b6aa674618e62e238cd6bac16b6e3ddaebebb Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 8 Nov 2011 18:44:54 +0100 Subject: s4:torture:smb2: rewrite the durable-open.file-position test to use smb2_oplock_create() --- source4/torture/smb2/durable_open.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'source4/torture/smb2') 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); -- cgit