On your first question about reparse points, I dont know of any other way,
than sending the irp and seeing the status_reparse. It’ll be interesting to
see what other responses you have on this question!
On your second question. There is the sort of basic “official” way to do
this which runs as about as follows … split the path into all of its
backslash separated components. Starting from the root look at the child
component along the path and see if its a legal dos 8.3 name with
RtlIsNameLegalDos8Dot3(); if it is then open the parent directory with
ZwCreateFile()/IoCreateFileSpecifyDeviceObjectHint and then
ZwQueryDirectoryFile/FileBothDirInformation with the parent handle and the
child name to get the long name of the child. Continue this process along
the path until you have processed all of the components. There are a few
issues to consider for example: performance; oplocks; tunnel cache;
recursion; stack utilization.
Cheers
Lyndon
“NTFSD-List” wrote in message news:xxxxx@ntfsd…
Hi All,
I have two questions:
1. What is a good way to determine if a component of a Path is
actually a reparse point? I want to do this in CREATE dispatch.
Currently we build our own Irp and check if we get a STATUS_REPARSE.
Is there a better way to do this? How can this be accomplished in a
minifilter?
2. What is a good way to get a Long path name in kernel mode in a
legacy filter? I am looking to write a kernel mode equivalent of
GetLongPathName(). What are the issues involved?
Thanks
Also keep in mind that getting STATUS_REPARSE is not a
true indication of whether it is a reparse point or
not. Any filter can return STATUS_REPARSE on a create
request, and some do.
— Lyndon J Clarke
wrote:
> On your first question about reparse points, I dont
> know of any other way,
> than sending the irp and seeing the status_reparse.
> It’ll be interesting to
> see what other responses you have on this question!
>
> On your second question. There is the sort of basic
> “official” way to do
> this which runs as about as follows … split the
> path into all of its
> backslash separated components. Starting from the
> root look at the child
> component along the path and see if its a legal dos
> 8.3 name with
> RtlIsNameLegalDos8Dot3(); if it is then open the
> parent directory with
>
ZwCreateFile()/IoCreateFileSpecifyDeviceObjectHint
> and then
> ZwQueryDirectoryFile/FileBothDirInformation with the
> parent handle and the
> child name to get the long name of the child.
> Continue this process along
> the path until you have processed all of the
> components. There are a few
> issues to consider for example: performance;
> oplocks; tunnel cache;
> recursion; stack utilization.
>
> Cheers
> Lyndon
>
> “NTFSD-List” wrote in message
> news:xxxxx@ntfsd…
> Hi All,
>
> I have two questions:
>
> 1. What is a good way to determine if a component of
> a Path is
> actually a reparse point? I want to do this in
> CREATE dispatch.
> Currently we build our own Irp and check if we get a
> STATUS_REPARSE.
> Is there a better way to do this? How can this be
> accomplished in a
> minifilter?
>
>
> 2. What is a good way to get a Long path name in
> kernel mode in a
> legacy filter? I am looking to write a kernel mode
> equivalent of
> GetLongPathName(). What are the issues involved?
>
> Thanks
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
Further on your first question there is of course the obvious … for each
component in the path, open the directory/file
ZwCreateFile()/IoCreateFileSpecifyDeviceObjectHint, and then query the
attributes (FileBasicInformation) or the reparse point information
FSCTL_GET_REPARSE_POINT
“NTFSD-List” wrote in message news:xxxxx@ntfsd…
Hi All,
I have two questions:
1. What is a good way to determine if a component of a Path is
actually a reparse point? I want to do this in CREATE dispatch.
Currently we build our own Irp and check if we get a STATUS_REPARSE.
Is there a better way to do this? How can this be accomplished in a
minifilter?
2. What is a good way to get a Long path name in kernel mode in a
legacy filter? I am looking to write a kernel mode equivalent of
GetLongPathName(). What are the issues involved?
Thanks
I believe (have seen once long time ago) that having
FILE_OPEN_REPARSE_POINT flag set in create options will not be reparsed
even if folder is a reparse point. Then you can queryfilinfo on the
FO/handle and check for FILE_ATTRIBUTE_REPARSE_POINT. I think that this
should work.
Vladimir Chtchetkine
Principal Engineer
Borland Software is the global leader in platform independent solutions
for Software Delivery Optimization, helping customers address the
constraints of modern day software development to maximize the business
value of their software.
-----Original Message-----
From: NTFSD-List [mailto:xxxxx@gmail.com]
Sent: Wednesday, August 17, 2005 9:37 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] two questions - reparse points and longpathname
Hi All,
I have two questions:
-
What is a good way to determine if a component of a Path is
actually a reparse point? I want to do this in CREATE dispatch.
Currently we build our own Irp and check if we get a STATUS_REPARSE.
Is there a better way to do this? How can this be accomplished in a
minifilter?
-
What is a good way to get a Long path name in kernel mode in a
legacy filter? I am looking to write a kernel mode equivalent of
GetLongPathName(). What are the issues involved?
Thanks
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
This is quite correct, as documented in the platform sdk, however does not
prevent reparse processing for an ancestor directory, hence the need to
recurse/iterate the parts of the path?
“Vladimir Chtchetkine” wrote in message
news:xxxxx@ntfsd…
I believe (have seen once long time ago) that having
FILE_OPEN_REPARSE_POINT flag set in create options will not be reparsed
even if folder is a reparse point. Then you can queryfilinfo on the
FO/handle and check for FILE_ATTRIBUTE_REPARSE_POINT. I think that this
should work.
Vladimir Chtchetkine
Principal Engineer
Borland Software is the global leader in platform independent solutions
for Software Delivery Optimization, helping customers address the
constraints of modern day software development to maximize the business
value of their software.
-----Original Message-----
From: NTFSD-List [mailto:xxxxx@gmail.com]
Sent: Wednesday, August 17, 2005 9:37 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] two questions - reparse points and longpathname
Hi All,
I have two questions:
1. What is a good way to determine if a component of a Path is
actually a reparse point? I want to do this in CREATE dispatch.
Currently we build our own Irp and check if we get a STATUS_REPARSE.
Is there a better way to do this? How can this be accomplished in a
minifilter?
2. What is a good way to get a Long path name in kernel mode in a
legacy filter? I am looking to write a kernel mode equivalent of
GetLongPathName(). What are the issues involved?
Thanks
—
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
Not necessarily. If a user is interested to know if a particular path
element is a reparse point then the fact that some ancestor dirs are (or
are not) reparse points could be irrelevant. It wasn’t clear from the
original question whether author interested to know if the entire path
may cause reparse or a particular path element is reparse point. If
first is correct then yes, it’s necessary to iterate through the entire
path. If second is the case then it wouldn’t be necessary.
Vladimir Chtchetkine
Principal Engineer
Borland Software is the global leader in platform independent solutions
for Software Delivery Optimization, helping customers address the
constraints of modern day software development to maximize the business
value of their software.
-----Original Message-----
From: Lyndon J Clarke [mailto:xxxxx@neverfailgroup.com]
Sent: Thursday, August 18, 2005 11:14 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] two questions - reparse points and longpathname
This is quite correct, as documented in the platform sdk, however does
not
prevent reparse processing for an ancestor directory, hence the need to
recurse/iterate the parts of the path?
“Vladimir Chtchetkine” wrote in
message
news:xxxxx@ntfsd…
I believe (have seen once long time ago) that having
FILE_OPEN_REPARSE_POINT flag set in create options will not be reparsed
even if folder is a reparse point. Then you can queryfilinfo on the
FO/handle and check for FILE_ATTRIBUTE_REPARSE_POINT. I think that this
should work.
Vladimir Chtchetkine
Principal Engineer
Borland Software is the global leader in platform independent solutions
for Software Delivery Optimization, helping customers address the
constraints of modern day software development to maximize the business
value of their software.
-----Original Message-----
From: NTFSD-List [mailto:xxxxx@gmail.com]
Sent: Wednesday, August 17, 2005 9:37 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] two questions - reparse points and longpathname
Hi All,
I have two questions:
1. What is a good way to determine if a component of a Path is
actually a reparse point? I want to do this in CREATE dispatch.
Currently we build our own Irp and check if we get a STATUS_REPARSE.
Is there a better way to do this? How can this be accomplished in a
minifilter?
2. What is a good way to get a Long path name in kernel mode in a
legacy filter? I am looking to write a kernel mode equivalent of
GetLongPathName(). What are the issues involved?
Thanks
—
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:
xxxxx@borland.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
>2. What is a good way to get a Long path name in kernel mode in a
legacy filter? I am looking to write a kernel mode equivalent of
GetLongPathName(). What are the issues involved?
ObQueryNameString on a file object.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
Unfortunately if the file was opened with the short
name, this returns the short name. No?
— “Maxim S. Shatskih”
wrote:
> >2. What is a good way to get a Long path name in
> kernel mode in a
> legacy filter? I am looking to write a kernel mode
> equivalent of
> GetLongPathName(). What are the issues involved?
>
> ObQueryNameString on a file object.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
Yes. Then you will need to dissect the name by slashes yourself, open each
of the partial paths and query for FileNameInformation (use
FileAlternateNameInformation if you need the short names).
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Randy Cook”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, August 23, 2005 6:41 PM
Subject: Re: [ntfsd] two questions - reparse points and longpathname
> Unfortunately if the file was opened with the short
> name, this returns the short name. No?
>
> — “Maxim S. Shatskih”
> wrote:
>
> > >2. What is a good way to get a Long path name in
> > kernel mode in a
> > legacy filter? I am looking to write a kernel mode
> > equivalent of
> > GetLongPathName(). What are the issues involved?
> >
> > ObQueryNameString on a file object.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > —
> > Questions? First check the IFS FAQ at
> > https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as:
> > xxxxx@yahoo.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@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com