Problem with patch and infinit directories

Michael Ellis ellis at spar.UUCP
Tue Jan 15 19:22:04 AEST 1985


>From Spencer Thomas:

>In article <4883 at utzoo.UUCP> henry at utzoo.UUCP (Henry Spencer) writes:
>>> It turned out that I didn't create an infinit number of subdirectories
>>> but rather a directory linked to itself, that is in directory A I have
>>> directory B which is a symbolic link to A. As soon as I create a file
>>> in A it will appear in B and B/B and B/B/B ...
>>
>>Aren't symbolic links delightful?
>
>I doubt very much it was a symbolic link - he said it showed up in the
>'ls' listing as a real directory.  Also, you can easily remove a
>symbolic link.  I think it was a real link (only possible under 4.2 when
>running as root, and VERY dangerous).

I also accidentally created a HARD link, using patch, that behaved as Henry
Spencer's monster. And it wrought havoc with our nightly filesystem
maintenance -- guess how long a `find' on the partition containing such a
directory will run...

Getting rid of the black hole was NOT fun. Assuming Henry's experience
was related to mine, I wonder how could patch do such an evil thing?
And how can I avoid this in the future, short of removing `patch'?

And just how is it possible for `root' to create such a directory in 4.2
without writing to raw disc?

-michael



More information about the Comp.unix mailing list