The true semantics of resetting Delete-on-Close

Richard Sharpe realrichardsharpe at gmail.com
Mon Jul 24 18:21:15 UTC 2017


Hi folks,

According to: https://download.microsoft.com/download/4/3/8/43889780-8d45-4b2e-9d3a-c696a890309f/File%20System%20Behavior%20Overview.pdf
section 4.3 File Deletion Semantics

> Note that if a handle is marked delete on close during create
> and the handle has not been closed, clearing the delete on close
> flag will have no effect. The link or stream will still be set to the
> delete-pending state when the handle is closed and thus ultimately deleted.

A scan of the code in
source3/smbd/trans2.c:smb_set_file_disposition_info suggests that we
do not properly implement those semantics. That is, if we are asked to
rest the Delete-on-Close state we do so even if the file is not in the
Delete-Pending state.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list