bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12632: file permissions checking mishandled when setuid


From: Eli Zaretskii
Subject: bug#12632: file permissions checking mishandled when setuid
Date: Mon, 15 Oct 2012 19:31:23 +0200

> Date: Sun, 14 Oct 2012 23:17:16 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]