[OpenAFS] dropbox semantics ("irl")
Jim Rees
rees@umich.edu
Wed, 30 May 2007 13:13:43 -0500
It's in Check_PermissionRights():
if (CallingRoutine & CHK_FETCH) {
/* must have read access, or be owner and have insert access */
if (!(rights & PRSFS_READ)
&& !(OWNSp(client, targetptr) && (rights & PRSFS_INSERT)))
return (EACCES);
...
} else { /* a store operation */
if ((rights & PRSFS_INSERT) && OWNSp(client, targetptr)
&& (CallingRoutine != CHK_STOREACL)
&& (targetptr->disk.type == vFile)) {
/* bypass protection checks on first store after a create
* for the creator; also prevent chowns during this time
* unless you are a system administrator */
/****** InStatus->Owner && UnixModeBits better be SET!! */
I haven't read the code but the comment implies that only the first store
will succeed (and we know that comments always exactly reflect the code)