EldoS | Feel safer!

Software components for data protection, secure storage and transfer

File attributes in callback seem to differ from actual parameters

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#17952
Posted: 10/21/2011 21:32:47
by Ben Schwarz (Standard support level)
Joined: 08/27/2011
Posts: 19

I am seeing a case where the file attributes in OnSetFileAttributes callback differ from what I see in a procmon trace. I'll attach a procmon image below, and the corresponding callbacks that roughly match up with the trace. The issue occurs on the second-to-last line where the actual call is setting the file attributes to (N)ormal, but the callback is telling us to use 0x21 (Read only + archive), which are the attributes that the file was originally opened with.

When I turn off the metadata cache, the SetFileAttributes call gives 0x80 (Normal file) as I expect, instead of 0x21.


#17953
Posted: 10/21/2011 21:33:08
by Ben Schwarz (Standard support level)
Joined: 08/27/2011
Posts: 19

2nd attachment


#17973
Posted: 10/24/2011 08:03:47
by Volodymyr Zinin (EldoS Corp.)

I haven't been able to reproduce it, but it seems found where the bug was and corrected it. The bugfix will be available in the next build.
If there is a way to easily reproduce the problem please tell me and I will check the bugfix.
#17978
Posted: 10/24/2011 18:13:58
by Ben Schwarz (Standard support level)
Joined: 08/27/2011
Posts: 19

Unfortunately I can't share our test case, but I would be happy to give your fix a try and report back if the behavior is corrected.
#18099
Posted: 11/06/2011 22:01:28
by Ben Schwarz (Standard support level)
Joined: 08/27/2011
Posts: 19

Hi Vladimir,

Unfortunately I am still seeing the issue in the .101 build of CbFs. The file attributes presented to our FS differ depending on whether metadata cache is enabled or disabled. I will attach our callback logs that were observed with metadata cache turned on and off.

Attaching logs using metadata cache to this message.


[ Download ]
#18100
Posted: 11/06/2011 22:02:00
by Ben Schwarz (Standard support level)
Joined: 08/27/2011
Posts: 19

Attaching logs with metadata cache disabled.


[ Download ]
#18256
Posted: 11/21/2011 01:35:38
by Volodymyr Zinin (EldoS Corp.)

Sorry for the delay. Perhaps the problem is in the processing of the OnSetFileAttributes callback. When it comes with FileAttributes set to 0 then it means that this parameter isn't changed. I see the documentation doesn't specify it. Please check this in your OnSetFileAttributes callback implementation.
In the case if the originator of the request wants to set the attributes to 0 it will pass not 0 but FILE_ATTRIBUTE_NORMAL.
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 1010 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!