EldoS | Feel safer!

Software components for data protection, secure storage and transfer

:Zone.Identifier files

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#6595
Posted: 06/11/2008 17:22:16
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

I have my virtual disk program, which uses the Callback File System, running pretty well and we are about to deploy it.

I was wondering if you have seen a phenomenon that I have just recently experienced.

When I drag and drop a folder into my virtual disk, I sometimes see for some of the files in the folder, an extra file created with the name of the new file being the name of the old file with :Zone.Identifier appended to it.

I Googled this and saw that this is a file that Windows Internet Explorer creates when you download files from an untrusted Internet Zone. Is it possible that CBFS is causing Windows to think that I am downloading things from the Internet, instead of just copying them from another drive?

Those files are very annoying because they have an illegal character in their name and therefore are very hard to delete.

Do you guys know anything about this?
#6596
Posted: 06/12/2008 02:11:01
by Eugene Mayevski (EldoS Corp.)

First of all, the created file is not a file, but a secondary named stream of a certain file. As such, you need to handle it as a stream. Next, you can (if allowed by your task) silently ignore the file by removing it right when it's closed. Deletion of such secondary stream from any file doesn't do any harm.


Sincerely yours
Eugene Mayevski
#6598
Posted: 06/12/2008 03:56:37
by Volodymyr Zinin (EldoS Corp.)

BTW: If you don't want that your CallbackFS implementation supports named streams (as for example FATFS does) then initialize the OnEnumerateNamedStreams callback to NULL.
#6599
Posted: 06/12/2008 04:07:33
by Eugene Mayevski (EldoS Corp.)

Quote
Eugene Mayevski wrote:
Deletion of such secondary stream from any file doesn't do any harm.


By "such" I meant solely "Zone.Identifier" stream, not other possible named streams that might be present.


Sincerely yours
Eugene Mayevski
#6608
Posted: 06/12/2008 13:22:45
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

Thank you for clarifying this. I don't believe I care about these secondary streams, so I'm leaning towards using Vladimir's idea of just turning off the OnEnumerateNamedStreams callback. Is there any potential downside to doing that, and does it solve my problem by getting rid of the extra "file"? (yes I know it is not really a file), or will I still have to do as Eugene suggests and delete the stream upon close?
#6610
Posted: 06/12/2008 13:38:51
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

Well now I'm even more confused. I looked at your documentation and in the section about the OnEnumerateNamedStreams event it says

Quote
The event is optional, i.e. you should not to attach an event handler if you don't plan to work with alternate (named) streams.


Well my current program does not attach an event handler for this event. Is this different than what Vladimir meant by setting the callback routine to NULL?

Please explain to me in great detail exactly what I should do to get rid of these secondary streams. Remember, you are dealing with a dense idiot, so be as explicit and clear as possible.
#6611
Posted: 06/12/2008 13:46:04
by Volodymyr Zinin (EldoS Corp.)

You can try both variants. But usually it's absolutely normal not to support alternate data streams. For example FATFS (that is usually used to format flash disks) doesn't support this feature. Also your CallbackFS implementation will be simplier without this.
#6612
Posted: 06/12/2008 13:48:59
by Volodymyr Zinin (EldoS Corp.)

Quote
Sid Schipper wrote:
Well my current program does not attach an event handler for this event. Is this different than what Vladimir meant by setting the callback routine to NULL?

No, it isn't. Perhaps there is a bug. We'll check it now.
#6613
Posted: 06/12/2008 13:53:40
by Volodymyr Zinin (EldoS Corp.)

Please specify what Windows version (including whether it's 32 or 64-bit) and type of CallbackFS api (.NET2.0, .NET1.1, Delphi, C++) are you using?
#6614
Posted: 06/12/2008 14:34:45
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

OK, I am running Windows XP Professional, Service Pack 2, 32 bit and I am using the C++ Library Interface to CBFS.

By the way, I tried my own solution to the problem that was similar to Eugene's idea, which was that in my OnCreate callback, if I see that the file name has a colon in it, I do not create it on my Virtual Disk and I set the FileContext to NULL so that subsequent reads or writes for the same file do nothing. So, instead of deleting it on close as Eugene suggested, I just never create it. This actually worked well with one or two trials, so I am pretty satisfied with it at this point. That doesn't mean I wouldn't be interested in finding out if you do have a bug that needs to be addressed, as I'd rather a more robust solution than the one I just described.
Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.

Reply

Statistics

Topic viewed 8730 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!