Re: [PATCH] notmuch-new.c infinite recursion symlink bug
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 21 Jun 2011 12:42:22 +0000 (08:42 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:39 +0000 (09:38 -0800)
2b/79224a2aac0e2e5e6c98b40e49a563cb786490 [new file with mode: 0644]

diff --git a/2b/79224a2aac0e2e5e6c98b40e49a563cb786490 b/2b/79224a2aac0e2e5e6c98b40e49a563cb786490
new file mode 100644 (file)
index 0000000..fcfc604
--- /dev/null
@@ -0,0 +1,107 @@
+Return-Path: <dkg@fifthhorseman.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 20B92431FD0\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Jun 2011 05:42:47 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id vUIaVqOE4M8S for <notmuch@notmuchmail.org>;\r
+       Tue, 21 Jun 2011 05:42:46 -0700 (PDT)\r
+Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])\r
+       by olra.theworths.org (Postfix) with ESMTP id BAA5E431FB6\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Jun 2011 05:42:46 -0700 (PDT)\r
+Received: from [192.168.13.75] (lair.fifthhorseman.net [216.254.116.241])\r
+       by che.mayfirst.org (Postfix) with ESMTPSA id A8EE9F970\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Jun 2011 08:42:44 -0400 (EDT)\r
+Message-ID: <4E0091AE.5070609@fifthhorseman.net>\r
+Date: Tue, 21 Jun 2011 08:42:22 -0400\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;\r
+       rv:1.9.2.17) Gecko/20110516 Icedove/3.1.10\r
+MIME-Version: 1.0\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] notmuch-new.c infinite recursion symlink bug\r
+References: <20110610073208.GA74787@codecafe.com>\r
+In-Reply-To: <20110610073208.GA74787@codecafe.com>\r
+X-Enigmail-Version: 1.1.2\r
+Content-Type: multipart/signed; micalg=pgp-sha512;\r
+       protocol="application/pgp-signature";\r
+       boundary="------------enig025FA00585AEAC79EB1990CB"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+Reply-To: notmuch <notmuch@notmuchmail.org>\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 21 Jun 2011 12:42:47 -0000\r
+\r
+This is an OpenPGP/MIME signed message (RFC 2440 and 3156)\r
+--------------enig025FA00585AEAC79EB1990CB\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On 06/10/2011 03:32 AM, Taylor Carpenter wrote:\r
+> If a symlink points to . then there will be an infinite recursion.  The=\r
+ included patch fixes that.\r
+\r
+what about a sub-directory that contains a symlink to ".." ?\r
+\r
+or a directory that contains both:\r
+\r
+ ./a/foo =E2=86=92 ../b\r
+ ./b/foo =E2=86=92 ../a\r
+\r
+or ...\r
+\r
+My point is: there are lots of ways to get infinite recursions via\r
+symlinks;  hard-coding a check for one specific way seems like a\r
+sub-optimal approach, because it leaves the other paths still present,\r
+and introduces an unexpected/surprising asymmetry.\r
+\r
+I'm not sure what the specific right way is to solve the problem you\r
+identified, though.\r
+\r
+       --dkg\r
+\r
+\r
+--------------enig025FA00585AEAC79EB1990CB\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: OpenPGP digital signature\r
+Content-Disposition: attachment; filename="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/\r
+\r
+iQJ8BAEBCgBmBQJOAJGuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w\r
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwRUU1QkU5NzkyODJEODBCOUY3NTQwRjFD\r
+Q0QyRUQ5NEQyMTczOUU5AAoJEMzS7ZTSFznpiG0P/jWnLtl/jNUVJVCm7RMI6OOG\r
+tzyPL/VvvnHVgdjECDwx5gtsO+7D9udgE1L8lPwwtYZ4C1wn2sSLT5NI3FdXxq4K\r
+JVCKWNwXzQndTupqSJHtfDBqZTmGBK22u9yfRXNKfRpm1L9tjAq8htWmWZ5LSmZk\r
+4oJoArPwMaGuwrdHr/4LHwPa3Ewqfq5wNxrnBA7KchTSiobAS01ZtZAWnxBSsCXf\r
+GbD457GRaHZSDqyY4InlLMHhnxd5GS6erHppHlzD7ADYC287c8HYaS7MddOahzFQ\r
+NEIXLMriteIrilurONCwgMEYKWW18dzFijud/IVFMsuWpnvHdIjV/En2LkOF6jDU\r
+PDiiA3UisdsP7vMCQ9hnCBaHuo0I6RPSXyCSb9LgoHXWLrCb2OXoRF3JkvjqS8u3\r
+qqcpUERIlspWl6hfgGxn4oPxrT9xy3kaXJd3IlaRFP7Qt13/jasc9MR5/N5SjBlD\r
+m2wqpVf90m+Rcw6qx5/yuabNfqkWJjCqydofkYzjB7n8l53OgKKY73gHbiOS6x4l\r
+0zh4qj3+oLREdCNSACF1ZcXXr2IqXQl0HZQ8tgk/1B6xFD3y5pD/DYJKy/Uebefm\r
+7N9EMwa2zlAG9YElitT7wy/RxosWidMXwMALAOUTvuRyVXrt9Sz5CIOpu76MfAS8\r
+K9T3G2DEcN6sYMDNuq15\r
+=pnpR\r
+-----END PGP SIGNATURE-----\r
+\r
+--------------enig025FA00585AEAC79EB1990CB--\r