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: Sun, 09 Sep 2007 21:12:33 -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 1189390231 16180 80.91.229.12 (10 Sep 2007 02:10:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2007 02:10:31 +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 Mon Sep 10 12:10:16 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 1IUfKc-00045j-BJ for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2007 11:13:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IUXqF-0000eD-PI for ged-emacs-devel@m.gmane.org; Sun, 09 Sep 2007 21:13:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IUXpg-0000PL-Vf for emacs-devel@gnu.org; Sun, 09 Sep 2007 21:12:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IUXpf-0000Ow-PI for emacs-devel@gnu.org; Sun, 09 Sep 2007 21:12:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IUXpf-0000Ot-NJ for emacs-devel@gnu.org; Sun, 09 Sep 2007 21:12:55 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IUXpf-0006ce-IW for emacs-devel@gnu.org; Sun, 09 Sep 2007 21:12:55 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IUXpJ-000763-5M; Sun, 09 Sep 2007 21:12:33 -0400 In-reply-to: (message from Stefan Monnier on Sun, 09 Sep 2007 15:44:56 -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:78390 gmane.emacs.pretest.bugs:19805 Archived-At: But in a directory with mode 1777 when you open a file that *you* own, nobody else can remove it or rename it, so normally nobody can replace it with a symlink. Emacs creates the problem when it moves /tmp/foo to /tmp/foo~ at which point /tmp/foo is free for an attacker to take. This suggests that Emacs should always do backup by copying in such directories. Would that solve the problem?