You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2008/09/04 14:32:27 UTC

DirectoryScanner and Symlinks

Hi all,

as Issue 45499 shows DirectoryScanner can run into infinite loops by
symbolic links that point to parent directories of the scanned
directory.

I've committed an AntUnit test file that shows some interactions of
DirectoryScanner and symlink to
<http://svn.apache.org/repos/asf/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml>.

There are two tests where Ant may run into infinite loops, the targets
with names that start with INFINITE and those should be fixed to
somehow deal with the situation more gracefully.

The original reporter suggested a patch that would simply skip any
symbolic link that was pointing to a parent of itself.  This would
break the currently passing "testLinkToParentFollowWithInclude" where
Ant doen't rescan ${base} because it doesn't satify the include
pattern and it stays in "fast mode" (only looking for matches).

My idea was to just make sure that Ant doesn't follow the same link
more than once (or doesn't scan the same directory more than once) but
either would break the currently passing
"testLinkToParentFollowWithIncludeMultiFollow".

The question is whether "testLinkToParentFollowWithIncludeMultiFollow"
and "testLinkToParentFollowWithInclude" are even supposed to pass or
whether we are willing to break BWC here (I lean towards breaking
testLinkToParentFollowWithIncludeMultiFollow but keeping
testLinkToParentFollowWithInclude).

As a side note: I detected a couple of other problems while putting
together the tests and will open new bugzilla issues.  Namely:

* <fileset followsymlink="false"/> follows the link if the basedir
  itself is a symbolic link (target
  FAILStestBasedirIsSymlinkNoFollow).

* <delete> fails to delete directories with symlink loops inside
  (that's why the targets delete the symlinks before tearDown).

* <symlink action="delete"> doesn't work if the link points to a
  parent directory.

Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Dominique Devienne <dd...@gmail.com>.
On Wed, Sep 10, 2008 at 2:58 PM, Gilles Scokart <gs...@gmail.com> wrote:
> If I take the example,
>          I <-----\
>         / \      |
>        /   \     |
>       B     C    |
>      /       \   |
>     /         \  |
>  file.txt      A--/
>
> and I start with /, with the pattern /**/*.txt, even with a
> maxLevelsOfSymlinks 1, I will get
> /B/file.txt
> /C/A/B/file.txt
>
> Clearly, you get twice the same file.  Maybe that's not what the user
> want.  But which one should we choose?

What matters most is to not get into infinite loops.

If someone puts cycles in its links, I'm not sure there's much we can
do more than avoid the infinite loop. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Gilles Scokart <gs...@gmail.com>.
2008/9/10 Stefan Bodewig <bo...@apache.org>:
> On Mon, 8 Sep 2008, Dominique Devienne <dd...@gmail.com> wrote:
>
>> On Mon, Sep 8, 2008 at 5:01 AM, Stefan Bodewig <bo...@apache.org> wrote:
>> > Does that sound OK?
>>
>> Sounds good to me.
>
> Of course we'd first check when we hit the name for the (MAX + 1)th
> time not for the MAXth time since the former would be allowed.  I
> wonder whether MAX = 1 would be a better default than 5.
>
>> I'd simply add a warning indicating maxSymlinkTraversal was
>> hit. "User" or verbose level is debatable again.
>
> Probably a good idea.
>
>> Similarly, maybe an internal flag in DS should be gettable to
>> possibly have client code remove duplicate entries if it wants to???
>
> Not sure what you mean here.
>

If I take the example,
          I <-----\
         / \      |
        /   \     |
       B     C    |
      /       \   |
     /         \  |
 file.txt      A--/

and I start with /, with the pattern /**/*.txt, even with a
maxLevelsOfSymlinks 1, I will get
/B/file.txt
/C/A/B/file.txt

Clearly, you get twice the same file.  Maybe that's not what the user
want.  But which one should we choose?


-- 
Gilles Scokart

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 10 Sep 2008, Dominique Devienne <dd...@gmail.com> wrote:

> On Wed, Sep 10, 2008 at 3:20 AM, Stefan Bodewig <bo...@apache.org> wrote:
> >> Similarly, maybe an internal flag in DS should be gettable to
> >> possibly have client code remove duplicate entries if it wants to???
> >
> > Not sure what you mean here.
> 
> Have an new accessor on DirectoryScanner to find out how many symlink
> hops it made, and whether is hit the limit, i.e. ignored some links.

The whether it hit the limit part is easy, but the way it is
implemented DirectoryScanner won't (in general) even know it followed
any symlinks before the limit is hit - this is all to avoid the cost
of File.getCanonicalPath() unless we really need to call it.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Dominique Devienne <dd...@gmail.com>.
On Wed, Sep 10, 2008 at 3:20 AM, Stefan Bodewig <bo...@apache.org> wrote:
>> Similarly, maybe an internal flag in DS should be gettable to
>> possibly have client code remove duplicate entries if it wants to???
>
> Not sure what you mean here.

Have an new accessor on DirectoryScanner to find out how many symlink
hops it made, and whether is hit the limit, i.e. ignored some links.
--DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 8 Sep 2008, Dominique Devienne <dd...@gmail.com> wrote:

> On Mon, Sep 8, 2008 at 5:01 AM, Stefan Bodewig <bo...@apache.org> wrote:
> > Does that sound OK?
> 
> Sounds good to me.

Of course we'd first check when we hit the name for the (MAX + 1)th
time not for the MAXth time since the former would be allowed.  I
wonder whether MAX = 1 would be a better default than 5.

> I'd simply add a warning indicating maxSymlinkTraversal was
> hit. "User" or verbose level is debatable again.

Probably a good idea.

> Similarly, maybe an internal flag in DS should be gettable to
> possibly have client code remove duplicate entries if it wants to???

Not sure what you mean here.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Dominique Devienne <dd...@gmail.com>.
On Mon, Sep 8, 2008 at 5:01 AM, Stefan Bodewig <bo...@apache.org> wrote:
> Does that sound OK?

Sounds good to me. I'd simply add a warning indicating
maxSymlinkTraversal was hit. "User" or verbose level is debatable
again. Similarly, maybe an internal flag in DS should be gettable to
possibly have client code remove duplicate entries if it wants to???
--DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
Code is in, documentation is not.  Please help me find good names and
default values 8-)

On Mon, 08 Sep 2008, Stefan Bodewig <bo...@apache.org> wrote:

> OK, combining suggestions by Gilles and Dominique here is what we
> could do:
> 
> * add a new sttribute for maxSymlinkRecursionDepth (better name
>   appreciated) and make it default to 5 (up for discussion as well).
>   This limits how many times the same symlink can be followed.

The attribute is maxLevelsOfSymlinks inspired by the error message you
get on Linux when you hit the OS limit in an infinite loop.

It's default value is 1 which means we wouldn't traverse a symlink
more than once.

> * If the same simple name appears for the MAXth time,

(MAX + 1)th time

> check whether that directory is a symlink.  If it is, check its
> canonical name and the canonical names of all other occurances of
> directories with the same name.

> If they all point to the same location

If more than MAX of them point to the same location

> , ignore the directory.  If they point to different locations
> recurse but revisit things if the same name is encountered for the
> (MAX + 1)th time

(MAX + 2)th time

> and so on.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 8 Sep 2008, Gilles Scokart <gs...@gmail.com> wrote:

> I fear that with this aproach, you may have to "rollback" some of
> the files already scanned because you will detect a loop after you
> have already looped one or more time (including multiple time the
> same files).

We'd detect the loop as soon as the maximum for recursion is reached,
I don't think any rollback will be needed.

> This "rollback" will be required if you want to provide a "clean"
> fileset when the patterns (and file system) would give infinite
> loop.

I don't intend to do that at all.  You'll get MAX recursions and no
more - but no less either if you give us an infinite pattern.

> The other aproach might be to fail the build if an infinite loop is
> detected. What is wrong with the failing aproach?

The original report was about <javac> recursing endlessly while
scanning something in JAVA_HOME (a fileset to grab all jars from the
extension dir would be my guess) without any user intervention - and
JAVA_HOME points to a symbolic link that points to a parent on this
particular Mac installation (I no longer have a working Mac to check
myself).

Note this is a fileset created by Ant internally and not defined by
the user.

Failing the build, while it is what we currently do, will not help
people in a situation like this, in particular not if they aren't
allowed to change the filesystem layout of the Java installation.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Gilles Scokart <gs...@gmail.com>.
I fear that with this aproach, you may have to "rollback" some of the
files already scanned because you will detect a loop after you have
already looped one or more time (including multiple time the same
files).

This "rollback" will be required if you want to provide a "clean"
fileset when the patterns (and file system) would give infinite loop.

The other aproach might be to fail the build if an infinite loop is
detected. What is wrong with the failing aproach?
It is simpler to implement, will be faster to execute, don't requires
an additional parameter and is I think easier to understand for the
user (he don't need to understand what files are included if its
pattern contains a loop).




2008/9/8 Stefan Bodewig <bo...@apache.org>:
> OK, combining suggestions by Gilles and Dominique here is what we
> could do:
>
> * add a new sttribute for maxSymlinkRecursionDepth (better name
>  appreciated) and make it default to 5 (up for discussion as well).
>  This limits how many times the same symlink can be followed.
>
> * Keep a stack of simple directory names (only the file name portion,
>  no leading directory and certainly not the canonical path) that
>  holds the names of all directories traversed so far while doing the
>  traversal.
>
> * If the same simple name appears for the MAXth time, check whether
>  that directory is a symlink.  If it is, check its canonical name and
>  the canonical names of all other occurances of directories with the
>  same name.  If they all point to the same location, ignore the
>  directory.  If they point to different locations recurse but revisit
>  things if the same name is encountered for the (MAX + 1)th time and
>  so on.
>
> This should address infinite loops and it should avoid
> getCanonicalPath as much as possible.
>
> I first thought it would be enough to check whether the link pointed
> to a parent directory but it is possible to create inifinte loops with
> two "cooperating" symlinks where neither link would point to a parent
> of its own.
>
> Does that sound OK?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>



-- 
Gilles Scokart

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
OK, combining suggestions by Gilles and Dominique here is what we
could do:

* add a new sttribute for maxSymlinkRecursionDepth (better name
  appreciated) and make it default to 5 (up for discussion as well).
  This limits how many times the same symlink can be followed.

* Keep a stack of simple directory names (only the file name portion,
  no leading directory and certainly not the canonical path) that
  holds the names of all directories traversed so far while doing the
  traversal.

* If the same simple name appears for the MAXth time, check whether
  that directory is a symlink.  If it is, check its canonical name and
  the canonical names of all other occurances of directories with the
  same name.  If they all point to the same location, ignore the
  directory.  If they point to different locations recurse but revisit
  things if the same name is encountered for the (MAX + 1)th time and
  so on.

This should address infinite loops and it should avoid
getCanonicalPath as much as possible.

I first thought it would be enough to check whether the link pointed
to a parent directory but it is possible to create inifinte loops with
two "cooperating" symlinks where neither link would point to a parent
of its own.

Does that sound OK?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Gilles Scokart <gs...@gmail.com>.
2008/9/5 Stefan Bodewig <bo...@apache.org>:
> On Fri, 5 Sep 2008, Gilles Scokart <gs...@gmail.com> wrote:
>
>> 2008/9/5 Stefan Bodewig <bo...@apache.org>:
>>> On Thu, 4 Sep 2008, Peter Reilly <pe...@gmail.com> wrote:
>>>
>>>> Is it not costly (as in very costly) to get the canonical path ?
>>>
>>> That's what I've been told but I've never measured it.
>>>
>>> Currently DirectoryScanner avoids looking at the canonical path
>>> unless followSymlinks is false.  The problem with infinite loops
>>> caused by symlinks only happens if followSymlinks is true - so any
>>> solution to the problem will make DirectoryScanner look up
>>> canonical paths more often and thus probably make scanning slower.
>>>
>>
>> Instead of checking the canonical path, we could maybe check to path
>> in which we want to recurse.
>
> I don't think I understand what you mean here.
>
> The directory listing of base will show a single child directory A
> with no indication that this is a link (the only way to find out is to
> get the canonical path).
>
>> The only case where we need to check for symlink is when we are in
>> A/base and want to recurse in a directory name A.
>
> How do we know this would be a recursion without checking the
> canonical path?
>
> Stefan


Instead of checking for every directory if it is a symlink, we first
scan the path name.  If we want to go into a directory A, we check if
we have already traversed a directory A.  We don't need any file
system acces for that.  And its only when we detect that out recusive
path will contains two A that we check if those two A have the same
canonical path.


But the more I think to it, the more I am in favor of a solution that
simply fail the build properly by indiciating that an infinite
recursive pattern has been used.  It is much simpler to implement, and
probably more intuitive.



-- 
Gilles Scokart

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 5 Sep 2008, Gilles Scokart <gs...@gmail.com> wrote:

> 2008/9/5 Stefan Bodewig <bo...@apache.org>:
>> On Thu, 4 Sep 2008, Peter Reilly <pe...@gmail.com> wrote:
>>
>>> Is it not costly (as in very costly) to get the canonical path ?
>>
>> That's what I've been told but I've never measured it.
>>
>> Currently DirectoryScanner avoids looking at the canonical path
>> unless followSymlinks is false.  The problem with infinite loops
>> caused by symlinks only happens if followSymlinks is true - so any
>> solution to the problem will make DirectoryScanner look up
>> canonical paths more often and thus probably make scanning slower.
>>
> 
> Instead of checking the canonical path, we could maybe check to path
> in which we want to recurse.

I don't think I understand what you mean here.

The directory listing of base will show a single child directory A
with no indication that this is a link (the only way to find out is to
get the canonical path).

> The only case where we need to check for symlink is when we are in
> A/base and want to recurse in a directory name A.

How do we know this would be a recursion without checking the
canonical path?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Gilles Scokart <gs...@gmail.com>.
2008/9/5 Stefan Bodewig <bo...@apache.org>:
> On Thu, 4 Sep 2008, Peter Reilly <pe...@gmail.com> wrote:
>
>> Is it not costly (as in very costly) to get the canonical path ?
>
> That's what I've been told but I've never measured it.
>
> Currently DirectoryScanner avoids looking at the canonical path unless
> followSymlinks is false.  The problem with infinite loops caused by
> symlinks only happens if followSymlinks is true - so any solution to
> the problem will make DirectoryScanner look up canonical paths more
> often and thus probably make scanning slower.
>

Instead of checking the canonical path, we could maybe check to path
in which we want to recurse.
The only case where we need to check for symlink is when we are in
A/base and want to recurse in a directory name A.
I'm not 100% sure that checking all part of the current directory
against the new sub directory would be much fatser, but it might be an
optimizing option.
Anyway, this kind of check should not be done on windows, and should
only be done if the new directory is matching within the ** part of a
pattern.


An other alternative might be to just add a depth counter, and when it
reach a resonably value, launch a procedure that check if this deep
path contains a recusion.  If it does, we can just fail the build,
asking to fix the fileset declaration.  If it doesn't, we increase the
max depth, and continue
That way the overhead is minimal and we keep backward compatibility.

-- 
Gilles Scokart

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 4 Sep 2008, Peter Reilly <pe...@gmail.com> wrote:

> Is it not costly (as in very costly) to get the canonical path ?

That's what I've been told but I've never measured it.

Currently DirectoryScanner avoids looking at the canonical path unless
followSymlinks is false.  The problem with infinite loops caused by
symlinks only happens if followSymlinks is true - so any solution to
the problem will make DirectoryScanner look up canonical paths more
often and thus probably make scanning slower.

> I would be for the lowest  tech possible here.

All solution offered so far would require DS to know a directory is a
link to do anything, which already means getting the canonical path
for all directories.  But what is the alternative?  Allowing Ant to
die because of the infinite loop?

I thought about adding yet another flag (detectSymlinkLoops?) to
enable/disable the check, but what should be the default, save or
fast?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Peter Reilly <pe...@gmail.com>.
Is it not costly (as in very costly) to get the canonical path ?

I would be for the lowest  tech possible here.

Peter


On Thu, Sep 4, 2008 at 4:38 PM, Dominique Devienne <dd...@gmail.com> wrote:
> On Thu, Sep 4, 2008 at 7:32 AM, Stefan Bodewig <bo...@apache.org> wrote:
>> as Issue 45499 shows DirectoryScanner can run into infinite loops by
>> symbolic links that point to parent directories of the scanned
>> directory.
>
> Instead of trying to track traversed directories using a stack or set,
> what about a low-tech max-symlink-hops check (and fileset attribute),
> defaulting to say 5, to break out of the infinite loop? --DD
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Dominique Devienne <dd...@gmail.com>.
On Thu, Sep 4, 2008 at 7:32 AM, Stefan Bodewig <bo...@apache.org> wrote:
> as Issue 45499 shows DirectoryScanner can run into infinite loops by
> symbolic links that point to parent directories of the scanned
> directory.

Instead of trying to track traversed directories using a stack or set,
what about a low-tech max-symlink-hops check (and fileset attribute),
defaulting to say 5, to break out of the infinite loop? --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 4 Sep 2008, Matt Benson <gu...@yahoo.com> wrote:

> In a nutshell, it seems we should keep track of the
> canonical paths scanned and refuse to recurse them for
> a path of infinite depth (i.e. one containing "**"). 

The situation of the testcase is (you'll need a monospaced font 8-)

       ,------>I
       |      / \
       |     /   \
       |   base   B
       |    /      \
       |   /        \
       `--A       file.txt
 
the fileset's basedir is "base".

> It could be possible to match a path containing a
> recursive symlink by > 1 path of different lengths. 
> So the infinite depth case is the one that could cause
> infinite recursion and is thus the one that should be
> guarded...

You mean an explicit A/base/A/B/file.txt would match but the same file
wouldn't be included if I used A/base/A/B/** or A/base/A/** ?

I could live with that, but it may seem confusing.  Not that I'd
expect anybody to use these kinds of patterns.

Would **/file.txt match A/B/file.txt at all?

> this shouldn't break anything that was already working,

True.  Most ** cases would run into infinite loops or fail with an
exception caused by the OS (Linux seems to limit the recursion depths
in a similar way Dominique suggests).

In my example above A/base/A/B/** wouldn't cause an infinite loop, so
the logic of not following a symlink must only be triggered if the
symlink itself would be part of the ** part.

In the end Dominique's idea may be simpler since we'd have to think
through cases of multiple patterns where one mathes exactly and the
other one is inside the ** part.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DirectoryScanner and Symlinks

Posted by Matt Benson <gu...@yahoo.com>.
In a nutshell, it seems we should keep track of the
canonical paths scanned and refuse to recurse them for
a path of infinite depth (i.e. one containing "**"). 
It could be possible to match a path containing a
recursive symlink by > 1 path of different lengths. 
So the infinite depth case is the one that could cause
infinite recursion and is thus the one that should be
guarded... this shouldn't break anything that was
already working, and would be limited enough to
preserve anything that was depending on symlink
recursion.  Are there flaws in my logic?

-Matt

--- Stefan Bodewig <bo...@apache.org> wrote:

> Hi all,
> 
> as Issue 45499 shows DirectoryScanner can run into
> infinite loops by
> symbolic links that point to parent directories of
> the scanned
> directory.
> 
> I've committed an AntUnit test file that shows some
> interactions of
> DirectoryScanner and symlink to
>
<http://svn.apache.org/repos/asf/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml>.
> 
> There are two tests where Ant may run into infinite
> loops, the targets
> with names that start with INFINITE and those should
> be fixed to
> somehow deal with the situation more gracefully.
> 
> The original reporter suggested a patch that would
> simply skip any
> symbolic link that was pointing to a parent of
> itself.  This would
> break the currently passing
> "testLinkToParentFollowWithInclude" where
> Ant doen't rescan ${base} because it doesn't satify
> the include
> pattern and it stays in "fast mode" (only looking
> for matches).
> 
> My idea was to just make sure that Ant doesn't
> follow the same link
> more than once (or doesn't scan the same directory
> more than once) but
> either would break the currently passing
> "testLinkToParentFollowWithIncludeMultiFollow".
> 
> The question is whether
> "testLinkToParentFollowWithIncludeMultiFollow"
> and "testLinkToParentFollowWithInclude" are even
> supposed to pass or
> whether we are willing to break BWC here (I lean
> towards breaking
> testLinkToParentFollowWithIncludeMultiFollow but
> keeping
> testLinkToParentFollowWithInclude).
> 
> As a side note: I detected a couple of other
> problems while putting
> together the tests and will open new bugzilla
> issues.  Namely:
> 
> * <fileset followsymlink="false"/> follows the link
> if the basedir
>   itself is a symbolic link (target
>   FAILStestBasedirIsSymlinkNoFollow).
> 
> * <delete> fails to delete directories with symlink
> loops inside
>   (that's why the targets delete the symlinks before
> tearDown).
> 
> * <symlink action="delete"> doesn't work if the link
> points to a
>   parent directory.
> 
> Stefan
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
> 
> 



      

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org