D-Programming-Language/phobos — pull request #422 by CyberShadow (2012-02-06 13:33:02+00:00)
Title: std.file: Use stat instead of access to check file existence on POSIX

The reason for this change is the quirky behavior of access for SUID
programs: a file may not appear to "exist", despite that the program
would be able to open it just fine. The behavior in question is described
as follows in the access man page:

> The check is done using the calling process's real UID and GID, rather
> than the effective IDs as is done when actually attempting an operation
> (e.g., open(2)) on the file. This allows set-user-ID programs to easily
> determine the invoking user's authority.

While various operating systems provide eaccess or euidaccess functions,
these are not part of POSIX - so it's safer to use stat instead.

Please merge this only if/when it passes the [pull auto-tester](http://d.puremagic.com/test-results/pulls.ghtml).