Kurt Mosiejczuk wrote:
> Just recently converted the main user machines students and faculty use
> to OpenBSD 6.1.  I've found out that git will abort in one scenario
> where there is a directory in the tree where the user has execute
> permissions but not read permissions.
> 
> I traced down this abort to a getcwd(3) call where git gets EACCES, and
> decides the world is ending.  On the Linux server that was retired, the
> getcwd(3) call just works.
> 
> Some folks suggested to me that getcwd(3) should work just fine in this
> scenario, so I installed a FreeBSD VM to see what happens there.
> 
> git is perfectly happy there.  That getcwd(3) works just fine.  Ok,
> since it's not just Linux behaving this way, I'm now wondering if this
> is a bug in OpenBSD's getcwd(3).  I realize this may also be a POSIX
> corner case.

Not so much a corner case as explicitly documented as a possible error.

http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html

[EACCES]
    Search permission was denied for the current directory, or read or
    search permission was denied for a directory above the current
    directory in the file hierarchy.

Reply via email to