lkml.org 
[lkml]   [2004]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Increase recursive symlink limit from 5 to 8
From
Date

[Petter Reinholdtsen]
> The comment in do_follow_link() do not match the code. The comment
> explain that the limit for recursive symlinks are 8, but the code
> limit it to 5. This is the current comment:

Hm, I wrote the following test script to test the current limit on
different unixes, and was surprised by the differences. And, my
previous claim that RedHat must have increased this limit was wrong.
The test on RedHat showed that it had the same limit as Debian. Not
sure why the symlinks in question seemed to be working on RedHat.

Linux: Symlink limit seem to be 6 path entities.
AIX: Symlink limit seem to be 21 path entities.
HP-UX: Symlink limit seem to be 21 path entities.
Solaris: Symlink limit seem to be 21 path entities.
Irix: Symlink limit seem to be 31 path entities.
Mac OS X: Symlink limit seem to be 33 path entities.
Tru64 Unix: Symlink limit seem to be 65 path entities.

I really think this limit should be increased in Linux. Not sure how
high it should go, but from 5 to somewhere between 20 and 64 seem like
a good idea to me.

Petri Koistinen suggested that I sent my patch to
<URL:http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/>.
I'll do that, replacing 5 with 64 instead of 8. No need to have any
lower limit than Tru64 Unix, I figure.

This is the test program I used:

#!/bin/sh
#
# Author: Petter Reinholdtsen
# Date: 2004-01-11
#
# Script to detect the kernels "recursive" symlink limit. This seem
# to differ from Unix to Unix, and from version to version.

TMPDIR=test

error() {
echo $1
exit 1
}

mkdir $TMPDIR || error "Unable to create $TMPDIR/"
(
cd $TMPDIR
for limit in `seq 1 10`; do
last=foo
echo "Limit $limit" > foo
for n in `seq $limit` ; do
ln -s $last $n
last="$n"
done
cat $last > /dev/null 2>&1 || error "Symlink limit seem to be $limit path entities."
for n in `seq $limit` ; do
rm $n
done
done
)
rm -rf $TMPDIR
-
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:59    [W:0.070 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site