EldoS | Feel safer!

Software components for data protection, secure storage and transfer

UserContext via ReparseRule

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#22028
Posted: 10/16/2012 02:35:04
by Daniel Wehrle (Basic support level)
Joined: 08/08/2008
Posts: 32

I experiment with your Encryption Example (XOR).

I have a symboliclink with a target that does not exist.

If i open the symboliclink it calls


  • 1. PostOpenFileC symlinkfile
  • 2. PostOpenFileC reparsefile
  • 3. ReadFileC reparsefile


1.* If the file is a symboliclink the "PostOpenFileC"-method execute this:

  • creating a temporary file with 2kb information (reparsefile)
  • add a reparserule mFilter.AddReparseFileNameRule(FileName(symlinkfile), tmpfile(reparsefile), "company");
  • create and allocate UserContext


Now when i use the "ReadFileC - Method" to read the file i have two problems:

First the method filter.openfile(symboliclink) returns an invalid handle.

Second the UserContext created in PostOpenFileC does not refer to the reparsed file.
So the UserContext in Callback methods "2. PostOpenFileC -- reparsefile" and 3. "ReadFileC -- reparsefile" is zero again.
(To test this case i used two real files too)

It seems the filter ignores the reparsefilterrule. Is there any way to pass the UserContext via the filterreparserule?
#22034
Posted: 10/16/2012 10:21:23
by Vladimir Cherniga (EldoS Corp.)

Quote
First the method filter.openfile(symboliclink) returns an invalid handle

What is the GetLastError() value in this case, how do you exactly create symbolic link ? filter.openfile() skip all filters and rules above the file system, in this case you reparse rule will not work with openfile() method.
Quote
Second the UserContext created in PostOpenFileC does not refer to the reparsed file.

Do you try to assign UserContext in PostCreate/PostOpen associated with reparse file ? Not the symbolic link. When driver returns STATUS_REPARSE it force object manager to reassign different fileobject structure and it seems that this leads to different context creation, associated with another file stream.

Reply

Statistics

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