-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetFileInfo triggers Notify when it doesn't change file attribute #1175
Comments
Hi @Lucasq11 , Thanks for the report and the analysis. Agree we should not notify if nothing has changed. If we had the item cache in the Kernel, we could know whether a value changed or not. |
I'm trying to modify the driver to avoid this issue, there's problem about signing. How can I acquire an avaliable cert to sign dokan1.sys when testsigning is off? |
You can order an EV signing certificate for your company. I have used GlobalSign for that for example. You get a USB token that you download the certificate to, use that to sign a cab file with a .inf and the driver, upload to Microsoft's attestant signing portal and after a few hours you get a zip file back with the signed driver. |
Environment
Check List
Description
I found that the setfileattribute function could trigger Notify to report a change even the file attribute is not changed.
Here is fuction DokanSetBasicInformation in dokan/setfile.c:
And the implementation of SetFileTime in dokanfuse/fusemain.cpp:
In a process, set_file_time is called and param creation_time, last_access_time, and last_write_time are all zero, in this situation atime and mtime should be set to the original values of this file from getattr. My fuse function utimens set this times from getattr and returns true to SetFileTime and DokanSetBasicInformation, in kernal mode, case FileBasicInformation is met in DokanCompleteSetInformation and DokanNotifyReportChange is called:
Here is the problem I'm facing:
An application keeps calling set_file_time to a directory in my fuse application and setting excatly the same times for the directory, and notify is trigger every time and the caller application is stuck for good.
I think there should be some conditions that will judge whether the file times or attributes are changed before calling DokanNotifyReportChange to notify the server. Or is there any other method I can follow to get rid of this endless notification?
The text was updated successfully, but these errors were encountered: