EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Trouble supporting read of ADS

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
Posted: 02/25/2016 18:13:49
by Eric Simmerman (Standard support level)
Joined: 06/14/2013
Posts: 12

I'm using CBFS 5 and attempting to deliver support for Alternate Data Streams for a virtual drive. I can write files with AD streams onto my virtual disk and all the appropriate CBFS hooks perform fine. I can then list the content of the folder containing the AD streams and that works as expected. I can even run "dir /R" against my virtual drive and can see the files with their AD streams as expected.

However - when I attempt to copy a file with AD stream from my virtual disk back to a local disk, I'm seeing some strange behavior. Specifically, OnOpenFile and OnGetFileInfo are called for the "real" file and its AD streams but OnReadFile is only called for the real file...never for the AD streams. Explorer just enters an infinite loop of querying with OnEnumerateNamedStreams...and subsequently opening but never reading the AD streams.

I expected the AD streams to be copied just like any other file - with a call to open followed by calls to read the data using OnReadFile ... is that my misunderstanding? Can you help me understand how Windows will actually fetch the AD stream data via CBFS callbacks?
Posted: 02/25/2016 18:16:05
by Eugene Mayevski (Team)

Mapper sample supports named streams. Could you please check whether it exposes similar problems for you?

Sincerely yours
Eugene Mayevski
Posted: 03/12/2016 22:15:11
by Eric Simmerman (Standard support level)
Joined: 06/14/2013
Posts: 12

Eugene - Mapper's sample implementation is helpful but of limited use since it is simply supporting manipulation of files that actually have AD streams whereas my virtualized drive needs to emulate AD streams with an abstraction of my own design.

My guess is that Windows doesn't like what I'm returning from OnGetFileInfo and that's why I never see a call to OnReadFile.
Posted: 03/13/2016 07:47:46
by Eugene Mayevski (Team)

Are you handling OnEnumerateNamedStreams event?

Sincerely yours
Eugene Mayevski



Topic viewed 3371 times

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


Back to top

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

Got it!