mkdir-dup test flapping
Jeremy Allison
jra at samba.org
Wed Mar 9 04:54:32 UTC 2016
On Wed, Mar 09, 2016 at 04:11:05PM +1300, Douglas Bagnall wrote:
> We looked at this some more, and Andrew seemed to understand and wrote
> the attached patch.
>
> We need to decide if the change in owner is enough reason to refuse
> the open(), or if we should just continue.
>
> On the basis that the owner change is not significant, we reworked the
> code to do the lstat() after the fstat(), and not compare the owner.
Fix is really close, but still needs a little work -
the call to:
fsp->file_id = vfs_file_id_from_sbuf(conn, &smb_dname->st);
needs to be moved too (as in the race condition
when need_lstat is true smb_dname->st isn't correctly
initialized yet), or the lstat needs to be done both
before and after. Doing the lstat twice might be
safer as I'll need to check what uses fsp->file_id
to ensure moving to after the lstat is safe.
*Really* nice work though - thanks ! It's late
here now so I'll take a look at this first thing
in thr morning (US Pacific time) and post an
updated patch for you to look at tomorrow.
Cheers,
Jeremy.
More information about the samba-technical
mailing list