From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28023: fix make-temp-file race on local host Date: Wed, 09 Aug 2017 19:05:16 +0300 Message-ID: <83poc4sp4z.fsf@gnu.org> References: <8c2c16ff-94ec-a691-57b1-bab8f5b39dfb@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1502295401 7529 195.159.176.226 (9 Aug 2017 16:16:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 9 Aug 2017 16:16:41 +0000 (UTC) Cc: 28023@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 09 18:16:34 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfTeq-0001WS-7R for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Aug 2017 18:16:32 +0200 Original-Received: from localhost ([::1]:48854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfTew-0004p3-IW for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Aug 2017 12:16:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfTUj-0005qI-UO for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 12:06:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfTUg-0000z9-Lb for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 12:06:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44805) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dfTUg-0000yp-Ha for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 12:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dfTUg-0006CA-1y for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 12:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2017 16:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28023-submit@debbugs.gnu.org id=B28023.150229474423789 (code B ref 28023); Wed, 09 Aug 2017 16:06:02 +0000 Original-Received: (at 28023) by debbugs.gnu.org; 9 Aug 2017 16:05:44 +0000 Original-Received: from localhost ([127.0.0.1]:53486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfTUN-0006Bd-RR for submit@debbugs.gnu.org; Wed, 09 Aug 2017 12:05:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfTUM-0006BR-Nw for 28023@debbugs.gnu.org; Wed, 09 Aug 2017 12:05:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfTUE-0000cS-Hc for 28023@debbugs.gnu.org; Wed, 09 Aug 2017 12:05:37 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfTUE-0000c8-8O; Wed, 09 Aug 2017 12:05:34 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1944 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dfTUD-0002s3-Ds; Wed, 09 Aug 2017 12:05:34 -0400 In-reply-to: <8c2c16ff-94ec-a691-57b1-bab8f5b39dfb@cs.ucla.edu> (message from Paul Eggert on Tue, 8 Aug 2017 22:38:05 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135603 Archived-At: > From: Paul Eggert > Date: Tue, 8 Aug 2017 22:38:05 -0700 > > I plan to install the attached patch in master soon, and am sending it for > review to bug-gnu-emacs first in case there's some problem with it on > MS-Windows. Thanks for the heads-up. Unfortunately, it isn't as simple as we'd like it to be, because Gnulib doesn't support file names encoded in UTF-8 (or any other encoding except the current system codepage) on MS-Windows, while Emacs does. We could resolve this problem by providing a way for the Windows build to specify its own replacements for 'open', 'mkdir', and 'lstat' (Emacs already have such replacements in w32.c), which tempname.c calls, but that would require minor changes in Gnulib's tempname.c. Or we could steal the relevant code from tempname.c into a Windows-specific implementation in w32.c, and refrain from using the Gnulib version on Windows. Which way would you prefer to go? Or maybe you have yet another idea? > @@ -1915,9 +1913,7 @@ endif > ## begin gnulib module secure_getenv > ifeq (,$(OMIT_GNULIB_MODULE_secure_getenv)) > > -ifneq (,$(gl_GNULIB_ENABLED_secure_getenv)) > > -endif > EXTRA_DIST += secure_getenv.c This seems to say that we will sometimes use secure_getenv, but the relevant code in tempname.c is conditioned on _LIBC, which AFAIU is only true when building glibc, so why do we need that? Or did I miss something?