[PATCH] Fail to copy file with empty FinderInfo from Windows client to Samba share with vfs_fruit

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Fail to copy file with empty FinderInfo from Windows client to Samba share with vfs_fruit

Samba - samba-technical mailing list
Hi!

Currently when a client sends a AFP_AfpInfo stream where the contained
FinderInfo blob is all 0, vfs_fruit will somewhat hackish delete the stream from
the backing store. This causes subsequent operations on the same filehandle to
fail for certain operations, also depending on the setting of fruit:metadata.

The correct implementation of the stream removal would be setting
delete-on-close on the filehandle, while at the same time checking in
delete-on-close is set in the stream-listing function.

Patch attached, please review & push if happy. Thanks!

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/

bug13181-master.patch (16K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fail to copy file with empty FinderInfo from Windows client to Samba share with vfs_fruit

Samba - samba-technical mailing list
Hi all,

Happy New Year everyone!

On Fri, Dec 08, 2017 at 12:12:10PM +0100, Ralph Böhme via samba-technical wrote:

> Currently when a client sends a AFP_AfpInfo stream where the contained
> FinderInfo blob is all 0, vfs_fruit will somewhat hackish delete the stream from
> the backing store. This causes subsequent operations on the same filehandle to
> fail for certain operations, also depending on the setting of fruit:metadata.
>
> The correct implementation of the stream removal would be setting
> delete-on-close on the filehandle, while at the same time checking in
> delete-on-close is set in the stream-listing function.
>
> Patch attached, please review & push if happy. Thanks!

anyone? Thanks!

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fail to copy file with empty FinderInfo from Windows client to Samba share with vfs_fruit

Samba - samba-technical mailing list
On Tue, Jan 02, 2018 at 02:33:56PM +0100, Ralph Böhme wrote:

> On Fri, Dec 08, 2017 at 12:12:10PM +0100, Ralph Böhme via samba-technical wrote:
> > Currently when a client sends a AFP_AfpInfo stream where the contained
> > FinderInfo blob is all 0, vfs_fruit will somewhat hackish delete the stream from
> > the backing store. This causes subsequent operations on the same filehandle to
> > fail for certain operations, also depending on the setting of fruit:metadata.
> >
> > The correct implementation of the stream removal would be setting
> > delete-on-close on the filehandle, while at the same time checking in
> > delete-on-close is set in the stream-listing function.
> >
> > Patch attached, please review & push if happy. Thanks!
>
> anyone? Thanks!

Another ping.

Thanks!
-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fail to copy file with empty FinderInfo from Windows client to Samba share with vfs_fruit

Samba - samba-technical mailing list
On Mon, Jan 08, 2018 at 07:13:49PM +0100, Ralph Böhme wrote:

> On Tue, Jan 02, 2018 at 02:33:56PM +0100, Ralph Böhme wrote:
> > On Fri, Dec 08, 2017 at 12:12:10PM +0100, Ralph Böhme via samba-technical wrote:
> > > Currently when a client sends a AFP_AfpInfo stream where the contained
> > > FinderInfo blob is all 0, vfs_fruit will somewhat hackish delete the stream from
> > > the backing store. This causes subsequent operations on the same filehandle to
> > > fail for certain operations, also depending on the setting of fruit:metadata.
> > >
> > > The correct implementation of the stream removal would be setting
> > > delete-on-close on the filehandle, while at the same time checking in
> > > delete-on-close is set in the stream-listing function.
> > >
> > > Patch attached, please review & push if happy. Thanks!
> >
> > anyone? Thanks!
>
> Another ping.

RB+ and pushed after rebasing to work on current master :-).

Jeremy.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fail to copy file with empty FinderInfo from Windows client to Samba share with vfs_fruit

Samba - samba-technical mailing list
On Mon, Jan 08, 2018 at 02:43:58PM -0800, Jeremy Allison via samba-technical wrote:

> On Mon, Jan 08, 2018 at 07:13:49PM +0100, Ralph Böhme wrote:
> > On Tue, Jan 02, 2018 at 02:33:56PM +0100, Ralph Böhme wrote:
> > > On Fri, Dec 08, 2017 at 12:12:10PM +0100, Ralph Böhme via samba-technical wrote:
> > > > Currently when a client sends a AFP_AfpInfo stream where the contained
> > > > FinderInfo blob is all 0, vfs_fruit will somewhat hackish delete the stream from
> > > > the backing store. This causes subsequent operations on the same filehandle to
> > > > fail for certain operations, also depending on the setting of fruit:metadata.
> > > >
> > > > The correct implementation of the stream removal would be setting
> > > > delete-on-close on the filehandle, while at the same time checking in
> > > > delete-on-close is set in the stream-listing function.
> > > >
> > > > Patch attached, please review & push if happy. Thanks!
> > >
> > > anyone? Thanks!
> >
> > Another ping.
>
> RB+ and pushed after rebasing to work on current master :-).

Ralph, the autobuild keeps failing with:

[720(4483)/2230 at 1h11m38s] samba3.libsmbclient(ad_dc)
[721(4488)/2230 at 1h11m38s] idmap.rfc2307(ad_member_rfc2307)
UNEXPECTED(failure): idmap.rfc2307.Testing for expected group memberships(ad_member_rfc2307)
REASON: Exception: Exception:

which I don't think is related. I'll try again tomorrow.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fail to copy file with empty FinderInfo from Windows client to Samba share with vfs_fruit

Samba - samba-technical mailing list
On Mon, Jan 08, 2018 at 08:04:46PM -0800, Jeremy Allison wrote:

> On Mon, Jan 08, 2018 at 02:43:58PM -0800, Jeremy Allison via samba-technical wrote:
> > On Mon, Jan 08, 2018 at 07:13:49PM +0100, Ralph Böhme wrote:
> > > On Tue, Jan 02, 2018 at 02:33:56PM +0100, Ralph Böhme wrote:
> > > > On Fri, Dec 08, 2017 at 12:12:10PM +0100, Ralph Böhme via samba-technical wrote:
> > > > > Currently when a client sends a AFP_AfpInfo stream where the contained
> > > > > FinderInfo blob is all 0, vfs_fruit will somewhat hackish delete the stream from
> > > > > the backing store. This causes subsequent operations on the same filehandle to
> > > > > fail for certain operations, also depending on the setting of fruit:metadata.
> > > > >
> > > > > The correct implementation of the stream removal would be setting
> > > > > delete-on-close on the filehandle, while at the same time checking in
> > > > > delete-on-close is set in the stream-listing function.
> > > > >
> > > > > Patch attached, please review & push if happy. Thanks!
> > > >
> > > > anyone? Thanks!
> > >
> > > Another ping.
> >
> > RB+ and pushed after rebasing to work on current master :-).
>
> Ralph, the autobuild keeps failing with:
>
> [720(4483)/2230 at 1h11m38s] samba3.libsmbclient(ad_dc)
> [721(4488)/2230 at 1h11m38s] idmap.rfc2307(ad_member_rfc2307)
> UNEXPECTED(failure): idmap.rfc2307.Testing for expected group memberships(ad_member_rfc2307)
> REASON: Exception: Exception:
>
> which I don't think is related. I'll try again tomorrow.

ok, thanks. Started pushing to autobuild as well, so please check if the
patchset is in master by tonight. :)

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fail to copy file with empty FinderInfo from Windows client to Samba share with vfs_fruit

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
On 09/01/18 17:04, Jeremy Allison via samba-technical wrote:
> Ralph, the autobuild keeps failing with:
>
> [720(4483)/2230 at 1h11m38s] samba3.libsmbclient(ad_dc)
> [721(4488)/2230 at 1h11m38s] idmap.rfc2307(ad_member_rfc2307)
> UNEXPECTED(failure): idmap.rfc2307.Testing for expected group memberships(ad_member_rfc2307)
> REASON: Exception: Exception:
>
> which I don't think is related. I'll try again tomorrow.

There have been 12 of these in the flakey tests since Christmas (~16 days),
but only 2 in the first 24 days of December.

Also since Christmas:

  14 UNEXPECTED(failure): samba.blackbox.wbinfo(ad_member:local).confirm output of wbinfo -i against ad_member(ad_member:local)
   6 UNEXPECTED(failure): samba3.unix.whoami machine account.whoami(nt4_member:local)

vs 10 and 6 for the rest of December, respectively.

It seems that something has changed, at least for rfc2307. At first I
wondered if the post-Christmas quiet had changed conditions enough to
flip a race, but now we're in the pre-release rush and it has stayed
the same.

Douglas