lkml.org 
[lkml]   [1999]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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.
iterative).

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 majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.089 / U:0.856 seconds]
©2003-2014 Jasper Spaans. Advertise on this site