I think the solution is to implement your own access management and lock
management in the filter; superseding the native access and locks management
of the file system.
Jamey
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@rdperf.com
Sent: Tuesday, September 13, 2005 9:56 AM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] opening file locked with exclusive access
I do agree with Ken that when an APP opens a file for Exclusive
access, it should mean exclusive.
The correct approach would be to modify the APP to open the file
allowing READ shared access, and NOWRITE.
Another approach could be to open the Partition and get the file’s
Logical Cluster Numbers and then read the actual disk blocks as
opposed to trying to read the file opened for exclusive access
if you really must bypass that.
However, I assume that if you can’t modufy the OPEN code, you probably
can’t modify the program open/read constructs to take an alternate
approach. If the APP can ABSTRACT the open/read concepts, then this
should be possible.
In fact, if you are filtering, you can do this from the filter driver
automatically.
Rick Cadruvi…
What you describe (“be able to pass/open the file in user app with no
communication with the mini filter”) is something the file system works very
hard to prevent. The whole point of locking a file is, well, to *lock* it
against others reading it.
You need to review your requirements.
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of marek
Sent: Tuesday, September 13, 2005 11:55 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] opening file locked with exclusive access
i want the user app to read the locked file without problems
i’ve studied the ifs samples (mainly Scanner) and have tested various
possibilities. The problem i have is that some functions of my user app is
in dlls that are not mine so i cannot use some ReadFileThroughFilter
function.
I have to be able to pass/open the file in user app with no communication
with the mini filter
thought it would be trivial but nothing seems that way here
Marko
“Lyndon J Clarke” wrote in message
news:xxxxx@ntfsd…
> What do you want to do with this file?
>
> “marek” wrote in message news:xxxxx@ntfsd…
>> hey, here’s a question about opening locked files
>>
>> i’ve read many posts and articles about all sorts of things with much
>> conclusive but…
>>
>> i have a win32 user app which wants to open a locked file (previously
>> opened as exclusive in another app)
>> as i’ve gathered the only way to do it is to get into IRP_MJ_CREATE and
>> reopen the file with different file create options.
>>
>> i’ve created a mini filter driver and in PreCreate succeded in opening a
>> file with various methods
>> ZwCreateFile - yes yes reentrancy
>> IoCreateFileSpecifyDeviceObjectHint - allmost ok
>> FltCreateFile - works as needed
>>
>> so i have the file open and what now?
>> I’ve tried to open it into FltObjects->FileObject with FltCreateFileEx
>> but i can’t try it yet because it’s not available on xp. I guess i’ll
>> have to install w2k and download the symbols… if i’m on the right track
>> anyway…
>>
>> How can i change the old file handle to the new one in the old
>> FileObject. Or must i create a new FileObject
>>
>> sorry for boring you and thank you
>> Marko
>>
>>
>
>
>
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@comcast.net
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@rdperf.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@rocketdivision.com
To unsubscribe send a blank email to xxxxx@lists.osr.com