Why can’t you intercept the read calls? What it sounds like is you are
MISSING the read calls, no doubt because you are focused on looking at
the file object used by MS Word or other applications. This is a
classic issue and one that is covered in the FAQ (you did read the FAQ,
right?)
I’m assuming you are writing in filter manager. You need only associate
filter context with the files so that you can detect the paging I/O
(which might be against a different file object but will use the same
file context normally) and then you can restrict your focus to
non-cached I/O operations (so you catch *user* non-cached I/O operations
from databases like SQL or Access, as well as *paging* non-cached I/O
operations from fetches into any memory mapped structure.) If you are
writing a legacy filter, you can use filter contexts on most current OS
versions. If you have to support older platforms you’ll need to read up
on reference counting and proper tracking techniques (and nobody gives
away examples of these as far as I know…)
Building file system filters - especially for encryption - is a
challenging undertaking. We’ve been down this road numerous times
before and I’ve watched a lot of people start down the “how hard can it
be” approach. Let me note it is VERY hard. Our own toolkit (“Data
Modification Kit”) was designed to allow compression + encryption in a
nice clean layered fashion and let me just note that it’s a substantial
undertaking - there are tens of thousands of lines of code and it spans
something like 125 source files now. There are dozens of complex issues
to handle and while I believe we’ve got the right product architecture
this time around there are still numerous details that constantly
challenge us - not to mention something along the lines of several
hundred “basic configurations” that must be tested (and when you start
adding interop issues into the mix the whole process becomes seriously
daunting…) The highlights for me are when we get to “show off” some
of the interesting features that fall out of the implementation (like
alternate data streams and mount points on FAT. One of these days we’ll
add EA support back into FAT as well. And now we have two new local
file systems on the horizons - read/write UDFS (Vista) and EXFAT (not
sure on this release, but there is a beta program for it up on the MS
beta site.)
Best of luck on your project!
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com http:</http:>
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Lokanadham R
Sent: Tuesday, September 05, 2006 8:45 PM
To: ntfsd redirect
Subject: Re: [ntfsd] Disable the Oplocks
Hi,
I am writing a filter driver that will encrypt/decrypt the file. The
problem i am facing is when some application uses memory mapped files
like MS Word or Wordpad to read the file. I cannot intercept the read
call for this kind of files, no IRP_MJ_READ for this kinda files. Is
there something special i have to do for this kind of memory mapped
files.
Thanks and Regards,
Lokanadham R
On 9/6/06, xxxxx@hotmail.com wrote:
Yes,it should be RDBSS,thanks tony~~~!
I have given up disable oplocks.That 's to say,the registry is
original(enable oplocks),and my code don’t deny the request for oplocks.
But,I still see it! And,I have see the case:
I createfile in filetest.exe—>IRP_MJ_CREATE
I read the data in filetest.exe(offset 3,length 3111)—>IRP_MJ_Read
(offset 3,length 3111)
I closehandle in filetest.exe— >IRP_MJ_Cleanup,IRP_MJ_Close
Yes,the IRP_MJ_Read is just send to server directly.didn’t cache it.
It’s so terrible.
I just only handle the paging IO.And because I have handled Paging IO,I
can’t handle normal IO.
But these IO is normal(not paging),I can’t decide to encrypt/decrypt it
or not.
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@gmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
–
Lokanadham R
Mobile:+91 9818476626 — Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17 You are currently subscribed
to ntfsd as: xxxxx@osr.com To unsubscribe send a blank email to
xxxxx@lists.osr.com