Re: PATCH: smart symlink loop detection.

H. Peter Anvin (hpa@transmeta.com)
15 Apr 1998 00:07:41 GMT


Followup to: <Pine.LNX.3.96.980414225457.21454B-100000@ps.cus.umist.ac.uk>
By author: Riley Williams <rhw@bigfoot.com>
In newsgroup: linux.dev.kernel
>
> My understanding was that the problem with bind is that it has
> symlinks nested to 7 or 8 levels deep, which Linux declares to be a
> loop, but I could be wrong on this.
>
> However, what I have found myself doing was creating multiple symlinks
> in the same directory, all pointing at the directory they're in, so as
> to satisfy HTML mapping requirements when I've pulled some pages of
> the web that I need to edit, and the fact that the limit is only five
> symlinks has on occasion frustrated this attempt as well.
>
> For this reason, I'd like to ask that the limit be raised to at least
> 15 even if no other changes are made here. I for one have never needed
> more than 15 depths of symlinks, and it should be a trivial task to
> calculate the extra stack space needed for the extra ten permitted
> symlinks...
>
> Best wishes from Riley.
>

I seem to recall the limit in BSD being 20. I was a bit surprised
that Linux was as low as 5. I would suggest 32 as a nice, round
number[1]; there is no reason to handle thousands of levels; all I can
really see benefitting from that is for malicious users who want to
find holes in the kernel.

-hpa

[1] Only computer people think 32 is round and 20 is not...

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu