dos filemode: a stale lock since 3.4
jra at samba.org
Tue Dec 28 19:13:04 MST 2010
On Tue, Dec 28, 2010 at 12:10:58PM -0800, Jeremy Allison wrote:
> On Tue, Dec 28, 2010 at 07:17:42PM +0300, Dmitry Butskoy wrote:
> > Dmitry Butskoy wrote:
> > >I've discovered an issue since the Samba 3.4, when "dos filemode =
> > >yes" and a "not-owner with write access" tries to change file
> > >attributes. A stale lock appear (it may vary depending on a
> > >particular user case, the simplified test see below).
> > >
> > >Comparing the function "smbd/open.c:open_file_fchmod()" between
> > >the versions 3.2.15 and 3.4.8, the call of "open_file" was changed
> > >to "SMB_VFS_CREATE_FILE()", but the correspond
> > >"smbd/open.c:close_file_fchmod()" seems not changed in this way.
> > >I guess this change causes the issue -- a stale WRONLY lock have
> > >appeared.
> > Well, the correspond git change is:
> > http://git.samba.org/?p=samba.git;a=commitdiff;h=6f7f4b428a86921e9532c62856873a19202f286d
> > When I revert it (for samba 3.4.9) the problem disappears (no any
> > locks pending).
> > Any comments? Is this a correct fix?
> Great catch ! Thanks. Your fix will work but will bypass
> the VFS for this operation, which is not what we want.
> I have a fix I think works without bypassing the VFS,
> I'll post it once I've done more testing.
Here's the patch for 3.4.x I think fixes it.
More information about the samba-technical