FSD cycles

It would appear that it is not possible to create cycles in a file system
directory structure. I’ve tried to do so using mount points and hard links.
Is this by design? Are file systems directory structures required to by
acyclic? Or is this just an NTFS property and othe file systems may be
different?

-Joel


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

FSD cyclesYou can indeed have cycles. Try using linkd from the Resource
Kit:

mkdir foo\bar
cd foo\bar
linkd cycle …
dir cycle /s/b

[note that dir (or the system) something eventually gives up on the
cycle…]

  • Danilo

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Smith, Joel
Sent: Thursday, March 01, 2001 1:20 PM
To: File Systems Developers
Subject: [ntfsd] FSD cycles

It would appear that it is not possible to create cycles in a file system
directory structure. I’ve tried to do so using mount points and hard links.
Is this by design? Are file systems directory structures required to by
acyclic? Or is this just an NTFS property and othe file systems may be
different?

-Joel


You are currently subscribed to ntfsd as: xxxxx@MIT.EDU
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Historical note:

Multics had no hard links, only soft links, so the directory tree was
guaranteed to be a DAG.

However, that didn’t stop the creation of cyclical soft links. So, the
kernel had a maximum number of soft links that it would traverse. Too many
links, you got an error code. I believe Unix is the same, and presumably NT.

Now for the funny part. The equivalent of MAX_PATH on Multics was 168. (We
didn’t have a preprocessor, so it wasn’t symbolic.) However, if you used
long, verbose, link names, and maxed the number of links, you could overflow
168 characters, with entertaining (though still secure) results.


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

you’re right. You can easily create cycles with linkd. reparse points.
Thank you very much. Well, everyone who hasn’t, modify your DirWalk
routines…

-----Original Message-----
From: Danilo Almeida [mailto:xxxxx@MIT.EDU]
Sent: Thursday, March 01, 2001 2:00 PM
To: File Systems Developers
Subject: [ntfsd] RE: FSD cycles

You can indeed have cycles. Try using linkd from the Resource Kit:

mkdir foo\bar
cd foo\bar
linkd cycle …
dir cycle /s/b

[note that dir (or the system) something eventually gives up on the
cycle…]

  • Danilo

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Smith, Joel
Sent: Thursday, March 01, 2001 1:20 PM
To: File Systems Developers
Subject: [ntfsd] FSD cycles

It would appear that it is not possible to create cycles in a file system
directory structure. I’ve tried to do so using mount points and hard links.
Is this by design? Are file systems directory structures required to by
acyclic? Or is this just an NTFS property and othe file systems may be
different?

-Joel


You are currently subscribed to ntfsd as: xxxxx@MIT.EDU
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@ntpsoftware.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I seem to recall when I first started playing with mount points on W2K I was
able to do the following with 2 partitions:

On drive C:, create a directory called DriveD and map it to the root of D:
On drive D:, create a directory called DriveC and map it to the root of C:

You now have a circular directory structure!!!

Just tried it on Whistler, works there too.

/ted


From: Smith, Joel[SMTP:xxxxx@ntpsoftware.com]
Reply To: File Systems Developers
Sent: Thursday, March 01, 2001 1:19 PM
To: File Systems Developers
Subject: [ntfsd] FSD cycles

It would appear that it is not possible to create cycles in a file system
directory structure. I’ve tried to do so using mount points and hard
links. Is this by design? Are file systems directory structures required
to by acyclic? Or is this just an NTFS property and othe file systems may
be different?

-Joel


You are currently subscribed to ntfsd as: xxxxx@livevault.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

As I recall there are other problems that were never worked out too.
For instance, create a directory on machine A and map it to a drive on
machine B. Then map a directory on the volume on machine B to a drive on
machine C. Now try and access machine C via the base of that chain. I
haven’t tried this since before W2K was released but when I did try it I was
not able to get access to machine C because the security information is not
passed through. It was problems like this and the possibilities of circular
structures that limited the exposure of mount points in W2K.

-----Original Message-----
From: Ted Hess [mailto:xxxxx@livevault.com]
Sent: Thursday, March 01, 2001 2:20 PM
To: File Systems Developers
Subject: [ntfsd] RE: FSD cycles

I seem to recall when I first started playing with mount points on W2K I was
able to do the following with 2 partitions:

On drive C:, create a directory called DriveD and map it to the root of D:
On drive D:, create a directory called DriveC and map it to the root of C:

You now have a circular directory structure!!!

Just tried it on Whistler, works there too.

/ted


From: Smith, Joel[SMTP:xxxxx@ntpsoftware.com]
Reply To: File Systems Developers
Sent: Thursday, March 01, 2001 1:19 PM
To: File Systems Developers
Subject: [ntfsd] FSD cycles

It would appear that it is not possible to create cycles in a file system
directory structure. I’ve tried to do so using mount points and hard
links. Is this by design? Are file systems directory structures required
to by acyclic? Or is this just an NTFS property and othe file systems may
be different?

-Joel


You are currently subscribed to ntfsd as: xxxxx@livevault.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@veritas.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Those limits would control the amount of traversal that would occur from
opening a single element of the path. There weren’t limits on how many
links you could traverse while opening a complete path (just max path,
whatever that was). FWIW, NT’s reparse point cap is presently 32.

I used to run a big distributed filesystem installation, and in order to
trap wild directory traversals that would escape from client machines
(or, worse, clients in other domains halfway around the world, creating
timeout problems on the fileservers) we created a cyclic directory at
the top of the namespace. I think it was …, .rathole or something like
that :slight_smile:

-----Original Message-----
From: Benson Margulies [mailto:xxxxx@basistech.com]
Sent: Thursday, March 01, 2001 11:19 AM
To: File Systems Developers
Subject: [ntfsd] RE: FSD cycles

Historical note:

Multics had no hard links, only soft links, so the directory tree was
guaranteed to be a DAG.

However, that didn’t stop the creation of cyclical soft links. So, the
kernel had a maximum number of soft links that it would traverse. Too
many links, you got an error code. I believe Unix is the same, and
presumably NT.

Now for the funny part. The equivalent of MAX_PATH on Multics was 168.
(We didn’t have a preprocessor, so it wasn’t symbolic.) However, if you
used long, verbose, link names, and maxed the number of links, you could
overflow 168 characters, with entertaining (though still secure)
results.


You are currently subscribed to ntfsd as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

The release version of Win2k does not let you linkd to a UNC
pathname…however, you can linkd to a drive letter that is mapped to a UNC
pathname. So I don’t think you can do what you describe – specifically,
“map a directory on the volume on machine B to a drive on machine C” –
since the drive mapping is just for the logon…

  • Danilo

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Rick Winter
Sent: Thursday, March 01, 2001 4:42 PM
To: File Systems Developers
Subject: [ntfsd] RE: FSD cycles

As I recall there are other problems that were never worked out too.
For instance, create a directory on machine A and map it to a drive on
machine B. Then map a directory on the volume on machine B to a drive on
machine C. Now try and access machine C via the base of that chain. I
haven’t tried this since before W2K was released but when I did try it I was
not able to get access to machine C because the security information is not
passed through. It was problems like this and the possibilities of circular
structures that limited the exposure of mount points in W2K.

-----Original Message-----
From: Ted Hess [mailto:xxxxx@livevault.com]
Sent: Thursday, March 01, 2001 2:20 PM
To: File Systems Developers
Subject: [ntfsd] RE: FSD cycles

I seem to recall when I first started playing with mount points on W2K I was
able to do the following with 2 partitions:

On drive C:, create a directory called DriveD and map it to the root of D:
On drive D:, create a directory called DriveC and map it to the root of C:

You now have a circular directory structure!!!

Just tried it on Whistler, works there too.

/ted


From: Smith, Joel[SMTP:xxxxx@ntpsoftware.com]
Reply To: File Systems Developers
Sent: Thursday, March 01, 2001 1:19 PM
To: File Systems Developers
Subject: [ntfsd] FSD cycles

It would appear that it is not possible to create cycles in a file system
directory structure. I’ve tried to do so using mount points and hard
links. Is this by design? Are file systems directory structures required
to by acyclic? Or is this just an NTFS property and othe file systems may
be different?

-Joel


You are currently subscribed to ntfsd as: xxxxx@livevault.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@veritas.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@MIT.EDU
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com