[PATCH] new delete-on-close scenes

Peter Somogyi PSOMOGYI at hu.ibm.com
Thu Dec 18 05:38:00 MST 2014


> I'd like to fully understand what Windows does here,
> but I'm doubtful we'll be able to reproduce fully
> as creating inside a folder without DELETE access
> (mapped into 'w' on POSIX) would violate server POSIX
> semantics, even if the file is deleted on close.
> 

Jeremy,

We are using nfs4 acls and can distinguish between DELETE and WRITE 
access.
For other ACL subsystems you are true, the indicating use case is lost 
because normal write (and read) is what's usually needed for tmp files.

Here is the description for each TC:

SET_DISP_NORMAL:
- disables DELETE access on parent dir (as already existing TCs do)
- verifies that only a new file can be opened with DELETE access, once 
after DELETE is forbidden
- demonstrates that DELETE access is effective at any time after then 
(sets and closes file that vanishes then)

SET_DISP_DIR
- demonstrates that this exceptional DELETE works on directories (while 
DELETE is forbidden)

SET_DISP_DENIED
- verifies that you can't set the file deleted via setinfo with no 
*desired* access, even when you could desire it
(should be trivial, but was important to make it clear in this confusion)

RENAME
- demonstrates that RENAME is effective after acquired the DELETE access 
(while DELETE is forbidden)

SET_DISP_PREEXIST
- shows that file can preexist when acquiring DELETE desired access, in 
the case it was allowed at open time
- shows DELETE is effective then (close & check file vanished)

Note: "vanished" means either a file reopen couldn't find it or returns 
with a delete pending error (saw both depending on test case).

--
Peter Somogyi
IBM Magyarországi Kft.
1117 Budapest
Infopark, Neumann János u. 1.
Hungary
Phone: +36 1 382 5469



More information about the samba-technical mailing list