[OpenAFS-port-darwin] 1.2.10 and patches?

Ragnar Sundblad ragge@nada.kth.se
Mon, 25 Aug 2003 12:17:39 +0200


--On den 25 augusti 2003 10:20 +0200 Sebastian Hagedorn 
<Hagedorn@uni-koeln.de> wrote:

>> The Mac OS X high-level APIs use stat() to examine access rights for
>> files and directories.  It trusts this data, and uses it to determine the
>> user interface.  For example, if a directory is mode 0, the Finder will
>> show a lock icon on it, and will not let you open it, even though AFS
>> will still let you open the directory if you have the proper rights in
>> the ACL.
>
> OK, I understand that. But what would be the alternative? How do other
> OS's deal with this issue? Should and do they actually try to read or
> write a file instead of relying on stat()? Doesn't this incur a severe
> performance penalty?

I believe that the common answer to this is that they should
use access(2) instead. There seems to have been a debate within
apple some years ago whether there is a performance penalty
with access, and I think that there is under certain
circumstances and that is supposed to be why they use stat
instead. Maybe the problem is that they want to stat anyway
and they figured that one call is faster than two.

I don't know how this has proceeded. Maybe someone else on this
list knows more.

/ragge