EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Can AddReparseFileNameRule support masks with process name?

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.
#31995
Posted: 01/23/2015 17:14:19
by umair sadiq (Basic support level)
Joined: 01/23/2015
Posts: 7

Can reparse filename be enabled for a specific process?

Currently it redirects calls from every process, e.g.,
g_CbFlt.AddReparseFileNameRule(L"C:\\temp\\*", L"C:\\temp2\\*");

However, is it possible to enable redirection (say for notepad.exe)? e.g.

g_CbFlt.AddReparseFileNameRule(L"notepad.exe|C:\\temp\\*", L"C:\\temp2\\*");
or
g_CbFlt.AddReparseFileNameRule(L"notepad.exe|C:\\temp\\*", L"notepad.exe|C:\\temp2\\*");
#31996
Posted: 01/23/2015 22:25:33
by umair sadiq (Basic support level)
Joined: 01/23/2015
Posts: 7

Actually, found one solution.

After adding g_CbFlt.AddReparseFileNameRule(L"C:\\temp\\*", L"C:\\temp2\\*");

We can add a ReparseFileNameCallback to revert the reparsing with mask ~notepad. So, for every process (except notepad), the path first gets reparsed and then gets reverted. For notepad, it gets reparsed and does not get reverted as intended.

Please do let me know if there is any better alternative.
#31997
Posted: 01/24/2015 05:48:37
by Vladimir Cherniga (EldoS Corp.)

Quote
initial trial wrote:
Please do let me know if there is any better alternative.

You may throw an exception from ReparseFileNameCallback, in that case file name reparse will not be processed in kernel, just continue file open as usual.
#32121
Posted: 02/05/2015 16:04:20
by umair sadiq (Basic support level)
Joined: 01/23/2015
Posts: 7

Thanks Vladimir!

Two additional question.

1. The above solution allows to redirect calls from a single process. Is it possible to accomplish the same goal for multiple processes?

2. Is there an option to specify rule masks that apply to the process as well as all of its child processes? Is there any work around to achieve this?
#32122
Posted: 02/06/2015 02:42:03
by Vladimir Cherniga (EldoS Corp.)

Quote
umair sadiq wrote:
1. The above solution allows to redirect calls from a single process. Is it possible to accomplish the same goal for multiple processes?

Reparse rules don't support process name in filter mask (only callback, access and passthrough rules accept such string format in the current version). Only one process per filter mask is available. There is two support api that can be used in callbacks as a workaround: GetOriginatorProcessId, GetOriginatorProcessName.
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

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