Re: [PATCH] notmuch-new.c infinite recursion symlink bug

Subject: Re: [PATCH] notmuch-new.c infinite recursion symlink bug

Date: Tue, 21 Jun 2011 08:42:22 -0400

To: notmuch@notmuchmail.org

Cc:

From: Daniel Kahn Gillmor


On 06/10/2011 03:32 AM, Taylor Carpenter wrote:
> If a symlink points to . then there will be an infinite recursion.  The included patch fixes that.

what about a sub-directory that contains a symlink to ".." ?

or a directory that contains both:

 ./a/foo → ../b
 ./b/foo → ../a

or ...

My point is: there are lots of ways to get infinite recursions via
symlinks;  hard-coding a check for one specific way seems like a
sub-optimal approach, because it leaves the other paths still present,
and introduces an unexpected/surprising asymmetry.

I'm not sure what the specific right way is to solve the problem you
identified, though.

	--dkg

signature.asc (application/pgp-signature)

Thread: