[PATCH] Bug #9870 - Not fetching the latest modification time on a folder if we have read locks on it.

Jeremy Allison jra at samba.org
Wed Dec 4 15:28:41 MST 2013

On Wed, Dec 04, 2013 at 10:23:30PM +0100, Volker Lendecke wrote:
> On Tue, Dec 03, 2013 at 05:33:44PM -0800, Jeremy Allison wrote:
> > If we set a non-null 'old timestamp' in the share mode database
> > when creating a directory handle, this prevents mtime (write time)
> > updates from being seen by clients, as we will always return the
> > timestamp stored in the database whilst the handle is open.
> > 
> > For files this is ok, as we update the stored timestamp
> > ourselves when we write to the handle. For directories
> > we should just rely on the mtime value from the underlying
> > filesystem as we don't update the write time in the share
> > mode database when new objects are created in the directory,
> > leading to stale write times being returned to the client
> > whilst the handle is open.
> > 
> > If null is stored in the share mode database instead
> > for a directory handle, the value read is explicitly
> > ignored and the underlying file system mtime is returned
> > instead for all info levels (and for SMB2/3 as well).
> > 
> > Torture test included that passes against Win2k12.
> > 
> > OEMs are reporting this bug as breaking some client
> > apps.
> Pushed with one minor update: I've added the new test to
> selftest/knownfail for the ntvfs server. Let's see if it
> survives. Hope that update was okay.

Doh ! Of course that's correct, sorry for missing that :-).

Thanks !


More information about the samba-technical mailing list