jilles 2010-05-05 22:19:52 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_7)
SVN rev 207685 on 2010-05-05 22:19:52Z by jilles
MFC r206760: getcwd(3): Clarify that EACCES may or may not be checked.
POSIX permits but does not require checking access on the current and parent
Because various programs do not like it if getcwd(3) fails, it seems best
to avoid checking access as much as possible. There are various reports in
GNATS about this (search for getcwd).
Our getcwd(3) implementation first queries the kernel for the pathname
directly, which does not check any permissions but sometimes fails, and then
falls back to reading all parent directories for the names.
Revision Changes Path
126.96.36.199 +11 -3 src/lib/libc/gen/getcwd.3