[PATCH]: s3: smbd: Fix delete-on-close after smb2_find

Volker Lendecke Volker.Lendecke at SerNet.DE
Sun Nov 5 07:24:32 UTC 2017


On Fri, Nov 03, 2017 at 11:59:02AM -0700, Jeremy Allison via samba-technical wrote:
> On Fri, Nov 03, 2017 at 08:39:35AM -0700, Jeremy Allison via samba-technical wrote:
> > > I was able to recreate the panic on my test system with the attached
> > > 'smb2.delete-on-close-perms.FIND and set DOC.FIND and set DOC'
> > > smbtorture test. Please see also my proposed fix. Both patches apply
> > > on master.
> > 
> > Thanks *VERY* much for the test.
> > 
> > I'm trying to avoid adding calls that use by-pathname semantics,
> > so I'll take a look at the patch to see if we can fix it another
> > way first.
> 
> Nope, we can't. Your patch is good :-). Not only that
> it fixes an underlying issue I missed where calling
> can_delete_directory_fsp() would certainly move the
> directory pointer internally, thus causing a standard
> directory listing to miss files.

I've tried too with a dup() on fsp->fh->fd, but that also moves the
offset. We need a new open() unfortunately.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de



More information about the samba-technical mailing list