The true semantics of resetting Delete-on-Close

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

Hi folks,

According to:
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.

Richard Sharpe

More information about the samba-technical mailing list