From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#12632: file permissions checking mishandled when setuid Date: Fri, 19 Oct 2012 10:01:23 -0700 Organization: UCLA Computer Science Department Message-ID: <50818763.80501@cs.ucla.edu> References: <5078CAB6.7020509@cs.ucla.edu> <83fw5i7s4p.fsf@gnu.org> <83a9vq7oqh.fsf@gnu.org> <507A58CC.10209@cs.ucla.edu> <83fw5h5yo6.fsf@gnu.org> <507B010F.20105@cs.ucla.edu> <831uh06gqd.fsf@gnu.org> <507B15B0.2040802@cs.ucla.edu> <83txtw4xmk.fsf@gnu.org> <507B2354.3030408@cs.ucla.edu> <83sj9g4vy7.fsf@gnu.org> <507BAA6C.2000601@cs.ucla.edu> <83lif74p78.fsf@gnu.org> <507C823D.40304@cs.ucla.edu> <83d30j3wqg.fsf@gnu.org> <507CF802.6000305@cs.ucla.edu> <83a9vm4bmv.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1350666165 16088 80.91.229.3 (19 Oct 2012 17:02:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2012 17:02:45 +0000 (UTC) Cc: 12632-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 19 19:02:52 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TPFyD-0007FU-C5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2012 19:02:49 +0200 Original-Received: from localhost ([::1]:55633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPFy6-0007KB-7m for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2012 13:02:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPFy0-0007F0-G8 for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 13:02:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPFxw-0005kp-G1 for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 13:02:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPFxw-0005kZ-DE for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 13:02:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TPFzO-0002ZF-EK for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 13:04:02 -0400 Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Oct 2012 17:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 12632 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 12632@debbugs.gnu.org, eggert@cs.ucla.edu Original-Received: via spool by 12632-done@debbugs.gnu.org id=D12632.13506661839797 (code D ref 12632); Fri, 19 Oct 2012 17:04:02 +0000 Original-Received: (at 12632-done) by debbugs.gnu.org; 19 Oct 2012 17:03:03 +0000 Original-Received: from localhost ([127.0.0.1]:51971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPFyQ-0002Xx-Hf for submit@debbugs.gnu.org; Fri, 19 Oct 2012 13:03:03 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:40962) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPFyN-0002XU-PO for 12632-done@debbugs.gnu.org; Fri, 19 Oct 2012 13:03:01 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 73E7839E811C; Fri, 19 Oct 2012 10:01:23 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J1OpNCM9mSQH; Fri, 19 Oct 2012 10:01:23 -0700 (PDT) Original-Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 0596E39E8105; Fri, 19 Oct 2012 10:01:23 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 In-Reply-To: <83a9vm4bmv.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65746 Archived-At: On 10/16/2012 09:36 AM, Eli Zaretskii wrote: >> > I thought the point of Bug#12587 was that on Windows, >> > 'stat' can be way slower than faccessat, so much >> > so that Emacs appears unresponsive. > Granted, I was talking only about Posix platforms. I'd rather avoid the situation where we have code like this: #if defined WINDOWSNT || defined __sun use faccessat #elif defined __linux__ use stat #else /* not sure which is faster */ #endif unless there's a reasonably significant performance advantage in doing so. The performance advantage of stat on GNU/Linux is relatively minor, whereas the performance advantage of faccessat on Windows is major. Since it's simpler to use faccessat everywhere, I installed a patch to do that as trunk bzr 110591 and am marking this bug as done. In the unlikely event that we run into significant performance issues because of this we can easily switch to the more-complex approach.