Jeremy Allison jra at
Tue Nov 22 17:06:58 GMT 2005

On Tue, Nov 22, 2005 at 06:42:00PM +0200, Nadav Danieli wrote:
> Hi,
> I'm looking at the reply_unlink code and I wonder how it is supposed to
> work at all.
> unlink_internals call can_delete and does then call SMB_VFS_UNLINK with
> no lock or share on the file.
> Why not simply call open_file_shared1 with delete on close and let close
> do it?

Yes that's a race condition, but no worse than other races we live with
every day. It's a historical artifact. I don't particularly want to
open the file on disk just to delete it if I can help it as this has
side effects with existing locks in POSIX.


More information about the samba-technical mailing list