[PATCHES][BUG 13673] smbd: Fix DELETE_ON_CLOSE behaviour on files with READ_ONLY attribute
cs at samba.org
Sat Nov 3 00:48:47 UTC 2018
On Fri, Nov 02, 2018 at 05:17:54PM -0700, Jeremy Allison wrote:
> On Fri, Nov 02, 2018 at 05:15:46PM -0700, Jeremy Allison via samba-technical wrote:
> > On Fri, Nov 02, 2018 at 05:03:45PM -0700, Christof Schmitt wrote:
> > > >
> > > > patch. It handles the delete-on-close of a new file *before*
> > > > we create the new file. Let me know if you're OK with it.
> > >
> > > I was also getting there. The two if statements for existing files can be
> > > combined to reduce the indentation. Also, for new files, shouldn't we
> > > set fsp->initial_delete_on_close = True as well? I need that to get the
> > > test to pass. (see attached version).
> Ah, now I see - if you combine the two if statements you need
> the additional fsp->initial_delete_on_close = True in the new
> file case. If you leave them separate (as I did) then the
> fsp->initial_delete_on_close = True gets done for both
> the existing and new file cases.
> I'm happy with whatever seems clearer to you - this code
> is tricky enough without anyone trying to be clever :-) :-).
Right. I am ok with either patch, too.
More information about the samba-technical