From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthieu Lemerre Newsgroups: gmane.emacs.devel Subject: Re: unicode build: "comparison is always true" warnings Date: Sat, 24 Nov 2007 12:23:22 +0100 Message-ID: <87wss7ubth.fsf@free.fr> References: <87oddltv7f.fsf@everybody.org> <87hcjcoo2x.fsf@everybody.org> <87wss8mypv.fsf@everybody.org> <87sl2wmmyk.fsf@everybody.org> <4747EF20.7050604@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1195913475 17624 80.91.229.12 (24 Nov 2007 14:11:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Nov 2007 14:11:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 24 15:11: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 1Ivvj4-0005IU-6H for ged-emacs-devel@m.gmane.org; Sat, 24 Nov 2007 15:11:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ivvip-0005xv-Gq for ged-emacs-devel@m.gmane.org; Sat, 24 Nov 2007 09:11:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IvviD-0005K1-DJ for emacs-devel@gnu.org; Sat, 24 Nov 2007 09:10:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IvviC-0005J3-RA for emacs-devel@gnu.org; Sat, 24 Nov 2007 09:10:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvviC-0005In-Cn for emacs-devel@gnu.org; Sat, 24 Nov 2007 09:10:24 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IvviA-0003Ov-Cj for emacs-devel@gnu.org; Sat, 24 Nov 2007 09:10:23 -0500 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Ivvhr-0007oT-2D for emacs-devel@gnu.org; Sat, 24 Nov 2007 14:10:03 +0000 Original-Received: from lemerre3.rez-gif.supelec.fr ([160.228.154.36]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 24 Nov 2007 14:10:02 +0000 Original-Received: from racin by lemerre3.rez-gif.supelec.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 24 Nov 2007 14:10:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lemerre3.rez-gif.supelec.fr User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:4MvHgGQQuG/76YvxEEGYB4Bbub8= X-detected-kernel: by monty-python.gnu.org: 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:84052 Archived-At: Andreas Schwab writes: > > In which way it is different from what mkstemp is doing? > When you use mktemp, you have to use two operations: 1/Create a file name with mktemp 2/Open it An attacker could create a symlink with this name file between these two operations, thus the file would be erased. mkstemp guarantees these two operations to be done atomically by the kernel (and the kernel chooses a name corresponding to an unused file name), so the race condition does not work in that case; the file descriptor is guaranteed to always correspond to a new file.