Problem with DELETE_ON_CLOSE open_file_ntcreate()?
jra at samba.org
Tue Jun 19 18:21:52 GMT 2007
On Tue, Jun 19, 2007 at 10:51:04AM -0700, Todd Stecher wrote:
> We're running 3.0.24.
> Here's the scenario:
> * A file exists on our share
> * An XP client opens the file:
> CreateFile(file, DELETE, 0, NULL, OPEN_EXISTING, DELETE_ON_CLOSE)
> api) with DELETE_ON_CLOSE (only 1 opener of file)
> * The file handle is closed, the file is NOT deleted.
> I'm hesitant to "fix" this (e.g. set the lock->delete_on_close bit
> when we see the FILE_DELETE_ON_CLOSE option), because there might be
> some subtlety I'm missing here. It also appears that Jeremy's been
> doing a lot of work in this area (so maybe its a TODO?). Upgrading
> to a newer version of Samba is not an option, but if there's a one
> line fix I'm missing, that'd be great. If its just an oversite, I'll
> submit a patch.
Have you tested the 3.0.25b codebase (SAMBA_3_0_25 branch) ?
I'm pretty sure I've fixed this for 3.0.25b. Look into
the flag I added SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE,
which is now set as the last parameter in the set_share_mode()
More information about the samba-technical