EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Mapper sample application doesn't work well in the latest version

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.
#17943
Posted: 10/20/2011 23:58:42
by xu zhi lian (Basic support level)
Joined: 09/27/2011
Posts: 17

I am using 3.2.100 version of CBFS.
I copied a file with stream data(e.g. test.zip) to vDisk(Z:) occur error, that means: Can't copy, the filename directory name or volume label syntax is incorrect.
but not always appear this error when copy files,Just destination directory partition type is FAT32 to appear this error.
I think that Callback File System can't delete file stream data auto when copy a file with stream data to the type of non-NTFS partition disk,However, The Windows file system can.
#17944
Posted: 10/21/2011 00:20:02
by Eugene Mayevski (EldoS Corp.)

Quote
xu zhi lian wrote:
I think that Callback File System can't delete file stream data auto when copy a file with stream data to the type of non-NTFS partition disk,However, The Windows file system can.


Nobody deletes noting in this scenario. When you copy the file to the filesystem, the filesystem is asked if it supports alternate data streams. If it does, then the copying mechanism attempts to copy ADS together with file data.

When you use Mapper sample, CBFS states that it does support ADS. But in fact it can't do this in your case because you've mapped a FAT folder. This can be treated as a shortcoming of the sample, indeed, but the sample is not intended to cover any possible usage scenarios.

You can modify callbacks which handle ADS in the sample and make them silently discard ADS being written. This would complicate the sample so we won't do this in stock sample.


Sincerely yours
Eugene Mayevski
#17945
Posted: 10/21/2011 03:09:08
by xu zhi lian (Basic support level)
Joined: 09/27/2011
Posts: 17

Thank very much,But how to discard ADS being written.
#17946
Posted: 10/21/2011 03:47:55
by Volodymyr Zinin (EldoS Corp.)

Set the pointer to your OnEnumerateNamedStreams callback to NULL.
#17947
Posted: 10/21/2011 03:48:22
by Eugene Mayevski (EldoS Corp.)

"Fake" writing operation, i.e. report success if you are asked to open the ADS for writing, and just discard the data being written to the ADS.

Another approach is
step 1) remove static assignment of ADS-related event handlers
step 2) assign these event handlers to events only after the user has specified the folder to map and you have checked and found that the disk being mapped does support ADS.


Sincerely yours
Eugene Mayevski
#17948
Posted: 10/21/2011 04:38:36
by xu zhi lian (Basic support level)
Joined: 09/27/2011
Posts: 17

Quote

"Fake" writing operation, i.e. report success if you are asked to open the ADS for writing, and just discard the data being written to the ADS.

Another approach is
step 1) remove static assignment of ADS-related event handlers
step 2) assign these event handlers to events only after the user has specified the folder to map and you have checked and found that the disk being mapped does support ADS.

I want to know which function is ADS-related callback function? Only OnEnumeraterNamedStreams?
Another question, how to make sure that the file is with data stream?
#17950
Posted: 10/21/2011 05:30:27
by Eugene Mayevski (EldoS Corp.)

Quote
xu zhi lian wrote:
I want to know which function is ADS-related callback function? Only OnEnumeraterNamedStreams?


Yes, mainly.

Quote
xu zhi lian wrote:
Another question, how to make sure that the file is with data stream?


Which file are you asking about? When the OS asks you to open the file for writing, you open the *file* (i.e. main data stream of the file). When you are asked to open ADS, you open (or refuse to open) ADS. Main and alternate streams are not related to each other and you can't say whether the file will have ADS when the file itself is opened.


Sincerely yours
Eugene Mayevski
Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.

Reply

Statistics

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