From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: creating backups in temporary directories Date: Fri, 07 Sep 2007 16:47:54 -0400 Message-ID: References: <85sl5q5vy6.fsf@lola.goethe.zz> <87y7fii7bz.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1189198116 18661 80.91.229.12 (7 Sep 2007 20:48:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2007 20:48:36 +0000 (UTC) Cc: Chris Moore , emacs-pretest-bug@gnu.org To: Sven Joachim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 07 22:48:36 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ITkkd-0005C6-0N for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2007 22:48:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITkkb-0002Cz-1W for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2007 16:48:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ITkkI-0001qr-Vu for emacs-devel@gnu.org; Fri, 07 Sep 2007 16:48:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ITkkI-0001py-DC for emacs-devel@gnu.org; Fri, 07 Sep 2007 16:48:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITkkH-0001pe-Uh for emacs-devel@gnu.org; Fri, 07 Sep 2007 16:48:05 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ITkkH-0002EW-Cw for emacs-devel@gnu.org; Fri, 07 Sep 2007 16:48:05 -0400 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ITkjx-0008Ra-VO for emacs-pretest-bug@gnu.org; Fri, 07 Sep 2007 16:47:45 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1ITkkE-0002D2-Bu for emacs-pretest-bug@gnu.org; Fri, 07 Sep 2007 16:48:04 -0400 Original-Received: from x-132-204-253-127.xtpr.umontreal.ca ([132.204.253.127] helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ITkkA-0002BV-Up; Fri, 07 Sep 2007 16:47:59 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id F173FB40A1; Fri, 7 Sep 2007 16:47:54 -0400 (EDT) In-Reply-To: <87y7fii7bz.fsf@gmx.de> (Sven Joachim's message of "Fri\, 07 Sep 2007 21\:49\:52 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Linux 2.6 (newer, 3) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:78201 gmane.emacs.pretest.bugs:19772 Archived-At: > Really? I've just tried this (with a symlink in ~/tmp instead of > /tmp), and Emacs removed the symlink for the backup before saving the > file. Are there circumstances where it might not do this? IIUC this depends on backup-by-copying. If backup-by-copying is nil, then the problem is indeed not present, but you get another one insted: right after Emacs moves /tmp/foo to /tmp/foo~ another user can add a symlink /tmp/foo that points to an interesting place and then when Emacs subsequently writes the new /tmp/foo it gets written to the location chosen by the attacker. Stefan