lkml.org 
[lkml]   [2002]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Symlink indirection
    From
    Date
    Pete Zaitcev <zaitcev@redhat.com> writes:

    > >> Is the number of allowed levels of symlink indirection (if that is the
    > >> right phrase; I mean symlink -> symlink -> ... -> file) dependant on the
    > >> kernel, or libc ? Where is it defined, and can it be changed?
    > >
    > > fs/namei.c
    > >
    > > if (current->link_count >= 5)
    > >
    > > change to a higher value.
    >
    > This is vey, very misleading statement. The counter mentioned above
    > is there to protect stacks from overflow, but our symlink resolution
    > is largely non-recursive, and certainly not in case of a tail
    > recursion within the same directory.

    tail recursion is a bad name, as that implies the last element of the
    path can go beyond the above value. A better way is to say that each
    element of the path can have at most link_count and the total path can
    have at most total_link_count symlinks (or that nested symlinks are
    limited to a small number, in Al's words).

    --
    # James Antill -- james@and.org
    :0:
    * ^From: .*james@and\.org
    /dev/null
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:31    [W:0.021 / U:59.976 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site