Convert unlink_internals to use delete_on_close?
Jeremy Allison
jra at samba.org
Thu Jan 4 20:59:01 GMT 2007
On Thu, Jan 04, 2007 at 09:51:58PM +0100, Volker Lendecke wrote:
> Hi, Jeremy!
>
> Right now I'm trying to streamline unlink_internals a bit.
> One way to do it correctly and a bit less racy would be to
> got through the full ntcreate, set_delete_on_close, close
> cycle.
>
> Speed-wise it should not make too much of a difference
> because in can_delete we go through ntcreate/close anyway.
> A necessary change would be to have close_file() actually
> return NTSTATUS (Hey, we have to take care of the return
> status of close(2) ;-)) to correctly report
> NT_STATUS_ACCESS_DENIED for example.
>
> What do you think? It potentially removes some of the code
> in reply.c.
That sounds ok to me. I especially like adding the NTSTATUS
return :-).
FYI: We're going to need to be able to flag opens from
unix clients separately though so we will be able to do
unlink on open files and not have the share modes conflict
if all opens are unix style - similar to what I did with
the posix lock code. Just wanted to run that past you.
Jeremy.
More information about the samba-technical
mailing list