From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#27986: 26.0.50; 'rename-file' can rename files without confirmation Date: Sat, 19 Aug 2017 18:04:49 -0400 Message-ID: <5b8f4814-a6bd-d373-f0e6-217845b44f1d@cornell.edu> References: <61980dde-3d68-7200-e7f4-98f62e410060@cs.ucla.edu> <0e80a1cf-8217-9e9a-a00f-9fdbd6575fc4@cs.ucla.edu> <0a79089f-36ed-8183-a3bf-6cfa32cb9028@cs.ucla.edu> <6dbd21fd-d191-812a-5810-cb4fbcfbcb20@cornell.edu> <0720ef94-7787-94e7-a44d-576ec7f75607@cornell.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1503180374 20123 195.159.176.226 (19 Aug 2017 22:06:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Aug 2017 22:06:14 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 Cc: 27986@debbugs.gnu.org To: Paul Eggert , Philipp Stephani , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 20 00:06:10 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 1djBse-0004o3-R2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Aug 2017 00:06:09 +0200 Original-Received: from localhost ([::1]:40350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djBsi-0003TP-BL for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Aug 2017 18:06:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djBsb-0003SR-Rw for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 18:06:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djBsY-0005x3-MK for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 18:06:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37227) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1djBsY-0005wk-Ia for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 18:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1djBsY-000572-2s for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 18:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Aug 2017 22:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27986 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: security Original-Received: via spool by 27986-submit@debbugs.gnu.org id=B27986.150318030819586 (code B ref 27986); Sat, 19 Aug 2017 22:06:02 +0000 Original-Received: (at 27986) by debbugs.gnu.org; 19 Aug 2017 22:05:08 +0000 Original-Received: from localhost ([127.0.0.1]:45908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djBrf-00055q-Nl for submit@debbugs.gnu.org; Sat, 19 Aug 2017 18:05:07 -0400 Original-Received: from limerock04.mail.cornell.edu ([128.84.13.244]:41872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djBrc-00055I-JD for 27986@debbugs.gnu.org; Sat, 19 Aug 2017 18:05:04 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v7JM4ohP019013; Sat, 19 Aug 2017 18:04:50 -0400 Original-Received: from [192.168.0.4] (mta-68-175-129-7.twcny.rr.com [68.175.129.7] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id v7JM4mb6020466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 19 Aug 2017 18:04:49 -0400 In-Reply-To: Content-Language: en-US X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; 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:135925 Archived-At: On 8/19/2017 5:37 PM, Paul Eggert wrote: > Ken Brown wrote: >> This is now done.  The implementation will appear in the next Cygwin >> release. When that release occurs, I'll install something like the >> attached patch. > > Thanks. > >> Question: Is the patch OK as is, or should I make the call to >> renameat2 conditional on CYGWIN?  In other words, is it safe to assume >> that renameat2 is defined on any platform on which RENAME_NOREPLACE is >> defined but not SYS_renameat2? > > It should be OK, for the same reason the RENAME_EXCL branch is OK (it > assumes renameatx_np). If we run across some future platform where it > doesn't work, we can port it then. As far as I know, Cygwin will be the > first platform with renameat2 in its C library. Is there any (good) reason that glibc doesn't provide a wrapper for it? It seems that this would be pretty trivial to do. Ken