We currently have a filter driver (above Lanman Redirector) that when it
receives a IRP_MJ_CREATE, we check in a stream of that file for some data,
allowing us to work out whether to the user has access to the file. The
problem we have is that when we try and open the other stream, we receive
another IRP_MJ_CREATE for the same file, we then have to check to see if we
are already trying to open that file.
Is there anyway to stop this looping problem?
Stephan Boome - Software Developer
BAE SYSTEMS, Christchurch, Dorset, BH23 4JE.
* Tel: (+44) 1202 404286
* Fax: (+44) 1202 408742
* Email: mailto:xxxxx@baesystems.com
Do a search on this list about recursing back into your filter driver.
Basically, it’s not a good idea. You’ll find some alternatives in the
results of the search.
Marc
-----Original Message-----
From: Stephan Boome [mailto:xxxxx@baesystems.com]
Sent: Wednesday, November 08, 2000 2:02 AM
To: File Systems Developers
Subject: [ntfsd] Filter Driver - Opening streams
We currently have a filter driver (above Lanman Redirector)
that when it
receives a IRP_MJ_CREATE, we check in a stream of that file
for some data,
allowing us to work out whether to the user has access to the
file. The
problem we have is that when we try and open the other
stream, we receive
another IRP_MJ_CREATE for the same file, we then have to
check to see if we
are already trying to open that file.
Is there anyway to stop this looping problem?
Stephan Boome - Software Developer
BAE SYSTEMS, Christchurch, Dorset, BH23 4JE.
* Tel: (+44) 1202 404286
* Fax: (+44) 1202 408742
* Email: mailto:xxxxx@baesystems.com
You are currently subscribed to ntfsd as: xxxxx@bionetrix.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> problem we have is that when we try and open the other stream, we receive
another IRP_MJ_CREATE for the same file, we then have to check to see if
we
are already trying to open that file.
Is there anyway to stop this looping problem?
- in your ZwCreateFile call, add some idiotic invalid suffix to the end of
the pathname.
- in your filter’s CREATE handler, check for this suffix. If it is found -
then this is your CREATE, truncate the suffix and pass down. Otherwise, this
is the user’s CREATE - handle it as intended.
Max
Stephan Boome
> We currently have a filter driver (above Lanman Redirector)
> that when it receives a IRP_MJ_CREATE, we check in a
> stream of that file for some data, allowing us to work out
> whether to the user has access to the file. The problem we
> have is that when we try and open the other stream, we receive
> another IRP_MJ_CREATE for the same file, we then have to
> check to see if we are already trying to open that file.
>
> Is there anyway to stop this looping problem?
Hi Stephan,
you can if pIrp->RequestorMode is non-zero. If it’s zero then the
call comes from Kernel mode, such as ZwCreateFile() or from the
network server. Otherwise it comes from a Ring 3 app, the kind of
I/O that you’ll be mostly interested in.
Joe