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: Paul Eggert
Subject: bug#12632: file permissions checking mishandled when setuid
Date: Mon, 22 Oct 2012 14:30:41 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

On 10/22/2012 02:04 PM, Eli Zaretskii wrote:
> Windows _is_ such a platform, "//foo/bar" and "/foo/bar" are very
> different things there.

What is the difference, from the point of view of the test?
The test is concerned only with trailing separators, not with
leading ones, so it shouldn't matter that "//foo/bar" and "/foo/bar"
might be different.

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 "\"?  Could you explain a scenario
where that might happen?  (By "searchable", I mean that the file
is a directory and one can resolve file names within that directory.)
Emacs currently assumes that all directories are searchable on
Windows, so any such scenario would break Emacs elsewhere, right?
If "/" and "//" and "\/" and "\" are always searchable,
it shouldn't matter which Emacs tested.

> Windows file APIs are picky wrt trailing slashes.

Can you give an example of how that might affect the test?
It's OK if Windows is picky about trailing slashes -- POSIX platforms
are too -- all that matters is whether the pickiness derails the test.

> 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.





reply via email to

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