Re: symlinks

C. Scott Ananian (cananian@lcs.mit.edu)
Fri, 17 Apr 1998 05:22:12 -0400 (EDT)


On Thu, 16 Apr 1998 Tim Smith <tzs@halcyon.com> wrote:

> Is there a list somewhere that gives examples of all the cases that one has
> to handle when dealing with symlinks? Ideal would be a shell script that
> creats a small directory tree with examples of all the cases. Symlink
> handling
> seems to me to be a lot easier than this discussion makes it sound, so I
> suspect
> I'm completely overlooking some major difficult case.

It's not terribly difficult, recursively. There's just that tricky
mid-recursion case to handle. See linux/fs/namei.c, especially the
functions lookup_dentry and do_follow_symlink. linux/fs/ext2fs/symlink.c
might be worth browsing, too. Once you've understood that, you've
understood it all.
--Scott
@ @
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-oOO-(_)-OOo-=-=-=-=-=
C. Scott Ananian: cananian@lcs.mit.edu / Declare the Truth boldly and
Laboratory for Computer Science/Crypto / without hindrance.
Massachusetts Institute of Technology /META-PARRESIAS AKOLUTOS:Acts 28:31
-.-. .-.. .. ..-. ..-. --- .-. -.. ... -.-. --- - - .- -. .- -. .. .- -.
PGP key available via finger and from http://www.pdos.lcs.mit.edu/~cananian
CONGRATULATIONS TO LINUX TORVALDS, PROUD NEW FATHER!

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