[lkml]   [1999]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Should we have MAXSYMLINKS?

On Wed, 13 Jan 1999, Roland McGrath wrote:

> There has always been an explicit check in BSD for following more than
> MAXSYMLINKS links. It is not expressing an implementation limit. The
> limit is there to catch infinite recursions (ln -s foo foo).
> This is what the ELOOP error exists to report.

Yes, indeed. I wrote that:
a) We have similar (see below) limit (5).
b) It is enforced in a single place.
c) It's low due to our implementation of namei() (recursive vs.

My fault, I didn't check the actual code before posting. Yes, 4.4 counts
total amount of symlinks (kern/vfs_lookup.c::namei()), but IMHO it is not
clear that we should do the same. Counting nested symlinks is enough for
loop detection. Anyway, if we want to enforce such limit we can do it in
do_follow_link() and lookup_dentry().

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:49    [W:0.114 / U:7.360 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site