From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12632: file permissions checking mishandled when setuid Date: Mon, 15 Oct 2012 19:31:23 +0200 Message-ID: <83lif74p78.fsf@gnu.org> 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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1350322327 24826 80.91.229.3 (15 Oct 2012 17:32:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Oct 2012 17:32:07 +0000 (UTC) Cc: 12632@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 15 19:32:13 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 1TNoWR-0007La-0e for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Oct 2012 19:32:11 +0200 Original-Received: from localhost ([::1]:41115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNoWK-0006Ig-4l for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Oct 2012 13:32:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNoWE-0006Gn-Fx for bug-gnu-emacs@gnu.org; Mon, 15 Oct 2012 13:32:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNoWA-0002ek-D9 for bug-gnu-emacs@gnu.org; Mon, 15 Oct 2012 13:31:58 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNoWA-0002ef-9u for bug-gnu-emacs@gnu.org; Mon, 15 Oct 2012 13:31:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TNoXF-0004Zr-RU for bug-gnu-emacs@gnu.org; Mon, 15 Oct 2012 13:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Oct 2012 17:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12632 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 12632-submit@debbugs.gnu.org id=B12632.135032235817564 (code B ref 12632); Mon, 15 Oct 2012 17:33:01 +0000 Original-Received: (at 12632) by debbugs.gnu.org; 15 Oct 2012 17:32:38 +0000 Original-Received: from localhost ([127.0.0.1]:45538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNoWs-0004ZF-GK for submit@debbugs.gnu.org; Mon, 15 Oct 2012 13:32:38 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:39011) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNoWr-0004Z3-1Y for 12632@debbugs.gnu.org; Mon, 15 Oct 2012 13:32:37 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MBY002003A8P000@a-mtaout20.012.net.il> for 12632@debbugs.gnu.org; Mon, 15 Oct 2012 19:31:14 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MBY002UR3C1GG30@a-mtaout20.012.net.il>; Mon, 15 Oct 2012 19:31:14 +0200 (IST) In-reply-to: <507BAA6C.2000601@cs.ucla.edu> X-012-Sender: halo1@inter.net.il 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:65637 Archived-At: > Date: Sun, 14 Oct 2012 23:17:16 -0700 > From: Paul Eggert > CC: 12632@debbugs.gnu.org > > On 10/14/2012 01:53 PM, Eli Zaretskii wrote: > > That sounds like a very weak reason to switch to a non-portable API > > Since the main objection here seems to be using the non-portable > function euidaccess, I changed the patch to use faccessat instead. Well, actually I thought we should stay with 'stat'. > faccessat, unlike euidaccess, is standardized by POSIX; it's a tad > more-complicated to use but it is standard and it's no doubt > a better solution in the long run anyway. The patch > uses the Gnulib substitute for faccessat for obsolescent POSIXish > hosts that lack faccessat. But those which have 'faccessat' probably also don't have the problems in 'stat' with huge files etc. So 'stat' is still better, IMO, because it is very efficient (since it's so ubiquitous in many programs). > For Windows the patch simply reworks the existing substitute for > 'access' so that it implements faccessat instead. Thanks, but you need to change all the calls to sys_access inside w32.c, or else Emacs won't link on Windows.