Redirecting FS filter and relative CREATE

RE: [ntfsd] RE: IRQL in FSD/Filter driver Hi all,

I’m writing an FS filter which sometimes redirects the CREATE requests to
the other file by updating the FileObject->FileName and returning
STATUS_REPARSE.
What if I would get relative CREATE with FileObject->RelatedFileObject is
not NULL?
The redirected file name has nothing to do with the related file object.
Must I set FileObject->RelatedFileObject to NULL before returning
STATUS_REPARSE? Must I call ObDereferenceObject on it before setting to
NULL?

Max

RelatedFileObject is referenced by ObOpenObjectByName
(before IopParseFile is actually called) so you do not need
to dereference it. It is used only in IRP_MJ_CREATE request.
This field in file object is invalid anytime after create has completed.

If you want to redirect the create request you can empty the
FO->RelatedFileObject, but you must then provide
full path name in FO->FileName (from the volume root).

Paul

-----P?vodn? zpr?va-----
Od: Maxim S. Shatskih [SMTP:xxxxx@storagecraft.com]
Odesl?no: 20. ?ervna 2000 0:28
Komu: File Systems Developers
P?edm?t: [ntfsd] Redirecting FS filter and relative CREATE

RE: [ntfsd] RE: IRQL in FSD/Filter driver Hi all,

I’m writing an FS filter which sometimes redirects the CREATE requests to
the other file by updating the FileObject->FileName and returning
STATUS_REPARSE.
What if I would get relative CREATE with FileObject->RelatedFileObject is
not NULL?
The redirected file name has nothing to do with the related file object.
Must I set FileObject->RelatedFileObject to NULL before returning
STATUS_REPARSE? Must I call ObDereferenceObject on it before setting to
NULL?

Max


You are currently subscribed to ntfsd as: xxxxx@sodatsw.cz
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Hi,

If I replace FO->FileName with my new file name,
who will free the memory of original FO->FileName?

Regards

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Pavel Hrdina
Sent: Tuesday, June 20, 2000 8:54 AM
To: File Systems Developers
Subject: [ntfsd] RE: Redirecting FS filter and relative CREATE

RelatedFileObject is referenced by ObOpenObjectByName
(before IopParseFile is actually called) so you do not need
to dereference it. It is used only in IRP_MJ_CREATE request.
This field in file object is invalid anytime after create has completed.

If you want to redirect the create request you can empty the
FO->RelatedFileObject, but you must then provide
full path name in FO->FileName (from the volume root).

Paul

> -----P?vodn? zpr?va-----
> Od: Maxim S. Shatskih [SMTP:xxxxx@storagecraft.com]
> Odesl?no: 20. ?ervna 2000 0:28
> Komu: File Systems Developers
> P?edm?t: [ntfsd] Redirecting FS filter and relative CREATE
>
> RE: [ntfsd] RE: IRQL in FSD/Filter driver Hi all,
>
> I’m writing an FS filter which sometimes redirects the CREATE
requests to
> the other file by updating the FileObject->FileName and returning
> STATUS_REPARSE.
> What if I would get relative CREATE with
FileObject->RelatedFileObject is
> not NULL?
> The redirected file name has nothing to do with the related file object.
> Must I set FileObject->RelatedFileObject to NULL before returning
> STATUS_REPARSE? Must I call ObDereferenceObject on it before setting to
> NULL?
>
> Max
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@sodatsw.cz
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)


You are currently subscribed to ntfsd as: xxxxx@yahoo.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)


Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

> If I replace FO->FileName with my new file name,

who will free the memory of original FO->FileName?

You, by ExFreePool.
It is allocated in the IO manager by ExAllocatePoolWithTag(PagedPool…,
‘mNoI’)

Max