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: Tue, 23 Oct 2012 05:47:58 +0200

> Date: Mon, 22 Oct 2012 14:30:41 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: rgm@gnu.org, 12632@debbugs.gnu.org
> 
> Is it possible in Windows that the searchability of the file named "//"
> differs from the searchability of "/"?  Or that the searchability
> of "\/" differs from that of "\"?

Both is true.  // or \\ or \/ starts a UNC, and Windows expects the
following to be the name of a remote machine.  / or \ is just the root
directory of the current drive.

> Emacs currently assumes that all directories are searchable on
> Windows, so any such scenario would break Emacs elsewhere, right?

expand-file-name already handles the UNC case.

> > Windows file APIs are picky wrt trailing slashes.
> 
> Can you give an example of how that might affect the test?

The call to faccessat could fail, just because of the "\/." at the
end of the file name.

> > We use IS_DIRECTORY_SEP in other places, so why avoid it here?
> 
> If it's not needed, it makes the code a bit harder to read.

I disagree.





reply via email to

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