From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: creating backups in temporary directories Date: Sat, 08 Sep 2007 15:47:36 -0400 Message-ID: References: <85sl5q5vy6.fsf@lola.goethe.zz> <87y7fii7bz.fsf@gmx.de> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1189280962 20481 80.91.229.12 (8 Sep 2007 19:49:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2007 19:49:22 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, christopher.ian.moore@gmail.com, svenjoac@gmx.de To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 08 21:49:22 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 1IU6Ir-00048g-H9 for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2007 21:49:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IU6Ip-0008KL-D2 for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2007 15:49:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IU6Hf-0007qI-TF for emacs-devel@gnu.org; Sat, 08 Sep 2007 15:47:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IU6He-0007ph-Ga for emacs-devel@gnu.org; Sat, 08 Sep 2007 15:47:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IU6He-0007pN-8l for emacs-devel@gnu.org; Sat, 08 Sep 2007 15:47:58 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IU6Hd-0006wm-Kt for emacs-devel@gnu.org; Sat, 08 Sep 2007 15:47:57 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IU6HI-0002B7-Rs; Sat, 08 Sep 2007 15:47:36 -0400 In-reply-to: (message from Stefan Monnier on Fri, 07 Sep 2007 16:47:54 -0400) 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:78285 gmane.emacs.pretest.bugs:19786 Archived-At: 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. I think we can't do anything to get rid of that problem. Writing thru symlinks is an important feature; if other people can create the symlink, it follows inevitably that they could do this.