The Samba-Bugzilla – Attachment 8870 Details for
Bug 9870
Not fetching the latest modification time on a folder if we have read locks on it.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
smb2 torture test case for modtime.
smb2.create.mod_time_check.txt (text/plain), 2.73 KB, created by
Hemanth
on 2013-05-08 00:44:14 UTC
(
hide
)
Description:
smb2 torture test case for modtime.
Filename:
MIME Type:
Creator:
Hemanth
Created:
2013-05-08 00:44:14 UTC
Size:
2.73 KB
patch
obsolete
>static bool test_mod_time_check(struct torture_context *tctx, > struct smb2_tree *tree, > struct smb2_tree *tree2) >{ > > bool ret = true; > NTSTATUS status; > union smb_open io1,io2; > struct smb2_handle h1, h2; > union smb_fileinfo finfo; > const char *fname = BASEDIR "\\subdir-name"; > > smb2_deltree(tree, fname); > smb2_util_rmdir(tree, fname); > > torture_comment(tctx, "TESTING CHANGE TIME ON DIRECTORIES\n"); > > /* > get a handle on the directory on Connection #1 > */ > torture_comment(tctx, "OPENING THE PARENT DIRECTORY\n"); > > ZERO_STRUCT(io1.smb2); > io1.generic.level = RAW_OPEN_SMB2; > io1.smb2.in.create_flags = 0; > io1.smb2.in.desired_access = SEC_RIGHTS_DIR_ALL; > io1.smb2.in.file_attributes = FILE_ATTRIBUTE_DIRECTORY; > io1.smb2.in.create_disposition = NTCREATEX_DISP_OPEN_IF; > io1.smb2.in.share_access = NTCREATEX_SHARE_ACCESS_READ | > NTCREATEX_SHARE_ACCESS_WRITE | > NTCREATEX_SHARE_ACCESS_DELETE; > io1.smb2.in.create_options = NTCREATEX_OPTIONS_DIRECTORY; > io1.smb2.in.fname = BASEDIR; > > status = smb2_create(tree, tctx, &(io1.smb2)); > CHECK_STATUS(status, NT_STATUS_OK); > h1 = io1.smb2.out.file.handle; > > torture_comment(tctx, "CREATING SUBDIR INSIDE PARENT\n"); > > ZERO_STRUCT(io2.smb2); > io2.generic.level = RAW_OPEN_SMB2; > io2.smb2.in.create_flags = 0; > io2.smb2.in.desired_access = SEC_RIGHTS_FILE_READ | > SEC_RIGHTS_FILE_WRITE| > SEC_RIGHTS_FILE_ALL; > > io2.smb2.in.create_options = NTCREATEX_OPTIONS_DIRECTORY; > io2.smb2.in.file_attributes = NTCREATEX_OPTIONS_DIRECTORY; > io2.smb2.in.share_access = NTCREATEX_SHARE_ACCESS_READ | > NTCREATEX_SHARE_ACCESS_WRITE | > NTCREATEX_SHARE_ACCESS_DELETE; > io2.smb2.in.create_disposition = NTCREATEX_DISP_CREATE; > io2.smb2.in.fname = BASEDIR "\\subdir-name"; > > status = smb2_create(tree, tctx, &(io2.smb2)); > CHECK_STATUS(status, NT_STATUS_OK); > h2 = io2.smb2.out.file.handle; > > torture_comment(tctx, "NOW CHECK THE TIMES ON PARENT:IT SHOULD MATCH WITH SUBDIR's\n"); > > CHECK_NTTIME(io2.smb2.out.write_time, write_time); > CHECK_NTTIME(io2.smb2.out.change_time, change_time); > > smb2_util_close(tree, h2); > smb2_util_close(tree, h1); > smb2_util_unlink(tree, fname); > smb2_deltree(tree, fname); > > return ret; > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9870
: 8870 |
8872
|
9501
|
9502
|
9513