From: Jesse Pollard <pollard@admin.navo.hpc.mil>
To: root@chaos.analogic.com, Marc-Christian Petersen <m.c.p@wolk-project.de>
Cc: linux-kernel@vger.kernel.org, Andrew Walrond <andrew@walrond.org>
Subject: Re: Symlink indirection
Date: Fri, 13 Dec 2002 10:26:00 -0600 [thread overview]
Message-ID: <200212131026.00287.pollard@admin.navo.hpc.mil> (raw)
In-Reply-To: <Pine.LNX.3.95.1021213102838.2190B-100000@chaos.analogic.com>
On Friday 13 December 2002 09:30 am, Richard B. Johnson wrote:
> On Fri, 13 Dec 2002, Marc-Christian Petersen wrote:
> > On Friday 13 December 2002 16:06, Andrew Walrond wrote:
> >
> > Hi Andrew,
> >
> > > 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.
> >
> > So, the answer is: Kernel :)
> >
> > ciao, Marc
>
> No, that thing (whetever it is) is different.
>
> Script started on Fri Dec 13 10:26:30 2002
> # file *
> foo: symbolic link to ../foo
> typescript: empty
> # pwd
> /root/foo
> # cd *
> # cd *
> # cd *
> # cd *
> # cd *
> # cd *
> # pwd
> /root/foo/foo/foo/foo/foo/foo/foo
> # cd *
> # cd *
> # cd *
> # pwd
> /root/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo
> # cd *
> # cd *
> # cd *
> # pwd
> /root/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo
> # exit
> exit
>
> Script done on Fri Dec 13 10:27:21 2002
>
>
> You can do this until you run out of string-space. Your "link-count"
> has something to do with something else.
Example isn't the same thing:
[pollard@merlin ~/test]$ echo "test" >target
[pollard@merlin ~/test]$ ln -s target a - 1 link
[pollard@merlin ~/test]$ ln -s a b - 2 links
[pollard@merlin ~/test]$ ln -s b c - 3
[pollard@merlin ~/test]$ ln -s c d - 4
[pollard@merlin ~/test]$ cat d
test
[pollard@merlin ~/test]$ ln -s d e -5
[pollard@merlin ~/test]$ cat e
test
[pollard@merlin ~/test]$ ln -s e f -6
[pollard@merlin ~/test]$ cat f
cat: f: Too many levels of symbolic links
This catches problem situations like:
[pollard@merlin ~/test]$ ln -s loop loop
[pollard@merlin ~/test]$ ls -l loop
lrwxrwxrwx 1 pollard NA0101 4 Dec 13 10:24 loop -> loop
[pollard@merlin ~/test]$ cat loop
cat: loop: Too many levels of symbolic links
--
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil
Any opinions expressed are solely my own.
next prev parent reply other threads:[~2002-12-13 16:18 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-13 15:06 Symlink indirection Andrew Walrond
2002-12-13 15:11 ` Marc-Christian Petersen
2002-12-13 15:20 ` Andrew Walrond
2002-12-13 17:22 ` Alan Cox
2002-12-13 15:30 ` Richard B. Johnson
2002-12-13 16:17 ` James Antill
2002-12-13 16:34 ` Andrew Walrond
2002-12-13 17:24 ` James Antill
2002-12-13 16:24 ` Andrew Walrond
2002-12-13 16:26 ` Jesse Pollard [this message]
2002-12-13 15:23 ` Richard B. Johnson
2002-12-13 16:41 ` Alfred M. Szmidt
2002-12-13 16:51 ` Jeff Bailey
2002-12-13 17:15 ` Amos Waterland
2002-12-13 17:51 ` Richard B. Johnson
[not found] ` <mailman.1039792562.8768.linux-kernel2news@redhat.com>
2002-12-13 16:16 ` Pete Zaitcev
2002-12-13 16:48 ` Andrew Walrond
2002-12-13 16:55 ` Pete Zaitcev
2002-12-13 17:04 ` Andrew Walrond
2002-12-14 5:57 ` Joseph Fannin
2002-12-14 12:47 ` Andrew Walrond
2002-12-14 13:55 ` John Bradford
2002-12-14 14:00 ` Andrew Walrond
2002-12-14 16:13 ` John Bradford
2002-12-14 19:50 ` Stephen Wille Padnos
2002-12-15 0:41 ` Andrew Walrond
2002-12-23 5:58 ` Thomas Zimmerman
2002-12-13 17:32 ` James Antill
[not found] <fa.eib7vkv.1tju08k@ifi.uio.no>
[not found] ` <fa.cnblikv.qjmuqd@ifi.uio.no>
2002-12-15 7:24 ` junkio
2002-12-15 12:17 ` Andrew Walrond
2002-12-15 12:58 ` John Bradford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200212131026.00287.pollard@admin.navo.hpc.mil \
--to=pollard@admin.navo.hpc.mil \
--cc=andrew@walrond.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.c.p@wolk-project.de \
--cc=root@chaos.analogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.