From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: backup method Date: Sat, 05 Feb 2005 11:26:49 +0100 Message-ID: References: <20050127000210.GA6167@boetes.org> <200501270045.j0R0jIq06197@raven.dms.auburn.edu> <20050127015432.GB6167@boetes.org> <20050128035618.GI6167@boetes.org> <20050129060851.GQ6167@boetes.org> <200501291842.j0TIgVw09020@raven.dms.auburn.edu> <20050129225259.GT6167@boetes.org> <87r7k3zti5.fsf-monnier+emacs@gnu.org> <874qgyxw24.fsf-monnier+emacs@gnu.org> <878y681iga.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1107600103 18741 80.91.229.2 (5 Feb 2005 10:41:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 5 Feb 2005 10:41:43 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 05 11:41:42 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CxNNL-0002Dq-Pi for ged-emacs-devel@m.gmane.org; Sat, 05 Feb 2005 11:41:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxNb2-0002uJ-E0 for ged-emacs-devel@m.gmane.org; Sat, 05 Feb 2005 05:55:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CxNZE-0002Gj-9h for emacs-devel@gnu.org; Sat, 05 Feb 2005 05:53:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CxNZ9-0002Eb-6F for emacs-devel@gnu.org; Sat, 05 Feb 2005 05:53:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxNZ8-0002Bx-UO for emacs-devel@gnu.org; Sat, 05 Feb 2005 05:53:26 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CxN9W-0006eP-Eo for emacs-devel@gnu.org; Sat, 05 Feb 2005 05:26:58 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1CxN6N-0000oA-IS; Sat, 05 Feb 2005 05:23:45 -0500 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sat, 05 Feb 2005 00:28:09 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32902 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32902 Richard Stallman writes: > The permissions in world-writable temp directories are almost always > 1777 which means that nobody but the owner can delete such a file. > > I had forgotten about that feature, so thanks for reminding me. > However, not all world-writable directories are temp directories. If the directory permissions are 777, then you can't do any further operation using the file _name_ after doing the creat system call (at which point its name is known and accessible). All you want to do with the file, you have to do via the file descriptor returned by creat. The only thing you can safely do with the file name after creat is deleting it again by name. Everything else is open to symlink attacks. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum