fileObject->RelatedFileObject significance

What is the significance of fileObject->RelatedFileObject.
In IRP_MJ_CREATE of a FSFD i get fileObject->RelatedFileObject->FileName.Length as non zero
but the fileObject->RelatedFileObject->FileName.Buffer is NULL. what is the issue here?

Mani,

The related file object is the object to which the current object is being
opened relative to. Hence there could be a pervious open to the file \dir1.
The later an open to foo.txt with the relatedfileobject the fileobject
processed during the \dir1 open.

You should not rely on the filename in the related fileobject. The only time
you can access the filename safely is during the IRP_MJ_CREATE dispatch
processing, that is before you send it down the stack to the FSD, and only
for the IspStack->Fileobject, not the related fileobject.

Pette

Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mani
Sent: Tuesday, May 17, 2005 10:39 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] fileObject->RelatedFileObject significance

What is the significance of fileObject->RelatedFileObject.
In IRP_MJ_CREATE of a FSFD i get
fileObject->RelatedFileObject->FileName.Length as non zero

but the fileObject->RelatedFileObject->FileName.Buffer is NULL. what is the
issue here?


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

A good way to test relative opens is to use command-line tools with the relative pathnames.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Peter Scott
To: Windows File Systems Devs Interest List
Sent: Wednesday, May 18, 2005 7:44 PM
Subject: RE: [ntfsd] fileObject->RelatedFileObject significance

Mani,

The related file object is the object to which the current object is being opened relative to. Hence there could be a pervious open to the file \dir1. The later an open to foo.txt with the relatedfileobject the fileobject processed during the \dir1 open.

You should not rely on the filename in the related fileobject. The only time you can access the filename safely is during the IRP_MJ_CREATE dispatch processing, that is before you send it down the stack to the FSD, and only for the IspStack->Fileobject, not the related fileobject.

Pette

Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mani
Sent: Tuesday, May 17, 2005 10:39 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] fileObject->RelatedFileObject significance

What is the significance of fileObject->RelatedFileObject.
In IRP_MJ_CREATE of a FSFD i get fileObject->RelatedFileObject->FileName.Length as non zero

but the fileObject->RelatedFileObject->FileName.Buffer is NULL. what is the issue here?


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
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: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Another good test is to access files through a local “share” via SRV (File
Server).

SRV uses ReleatedFileObjects which, I believe, are the “share point” path.

HTH, /ted

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, May 18, 2005 3:46 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] fileObject->RelatedFileObject significance

A good way to test relative opens is to use command-line tools with the
relative pathnames.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com mailto:xxxxx
http://www.storagecraft.com http:

----- Original Message -----
From: Peter mailto:xxxxx Scott
To: Windows File Systems Devs Interest List mailto:xxxxx
Sent: Wednesday, May 18, 2005 7:44 PM
Subject: RE: [ntfsd] fileObject->RelatedFileObject significance

Mani,

The related file object is the object to which the current object is being
opened relative to. Hence there could be a pervious open to the file \dir1.
The later an open to foo.txt with the relatedfileobject the fileobject
processed during the \dir1 open.

You should not rely on the filename in the related fileobject. The only time
you can access the filename safely is during the IRP_MJ_CREATE dispatch
processing, that is before you send it down the stack to the FSD, and only
for the IspStack->Fileobject, not the related fileobject.

Pette

Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300

_____

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mani
Sent: Tuesday, May 17, 2005 10:39 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] fileObject->RelatedFileObject significance

What is the significance of fileObject->RelatedFileObject.
In IRP_MJ_CREATE of a FSFD i get
fileObject->RelatedFileObject->FileName.Length as non zero

but the fileObject->RelatedFileObject->FileName.Buffer is NULL. what is the
issue here?


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
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: unknown lmsubst tag argument: ‘’
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: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com</mailto:xxxxx></mailto:xxxxx></http:></mailto:xxxxx>

> A good way to test relative opens is to use

command-line tools with the relative pathnames.

You also may watch relative file opens using the
FileTest interactive utility, available at OSR.
If you go to the NtCreate page, you may edit
a directory and a file, like:

Directory: ??\C:\Windows
File : System32\Kernel32.dll

and press “NtCreate” button. This will generate
two create requests - the first one is the directory
open, the second one is the file open/create.

L.