Created attachment 15135 [details] Disable recvfile on streams The recvfile implmentation relies on a proper system fd being available. Depending on the VFS module providing streams support, this assumption doesn't hold so client writes on a stream may file. This has been seen in the wild with vfs_fruit + vfs_streams_xattr, "min receivefile size = 131072" in smb.conf and a Mac copying a file with a large Resource fork (AFP_AfpResource:$DATA stream). I don't think it makes sense to enable recvfile on streams in the first place. The attached patch would disable it. Thoughts?
Oh, good catch ! I'll push.
Ah, no signed-off or bugid in the patch. I think that's trying to tell me something. I won't push until I get your OK with it :-). It's clearly right though, so in your own time please !
Thanks! I wasn't entirely sure if I possibly missed some aspect, that's why I just asked for feedback and provided a WIP patch. Fwiw, the patch fixed the issue at a customer. Pushed to master. Thanks!
Hmmm. It's possible this might be a problem with SMB1 also, but I'm really trying to kill that :-). Let me check and see if there's anything we can do in an SMB1 case also - but that would be an additional patch.
Hold off on the push! There's an easy fix for SMB1 also. Sorry for not noticing this earlier.
Created attachment 15136 [details] git am fix for master for SMB1 Ralph, here's the extra fix for SMB1. You can either include this in your patch, or push as an additional patch if you are OK with the review. Sorry once again for missing this case. Jeremy.
Created attachment 15140 [details] Patch for 4.9 and 4.10 cherry-picked from master
Re-assigning to Karolin for inclusion in 4.10.next, 4.9.next.
(In reply to Jeremy Allison from comment #8) Pushed to autobuild-v4-{10,9}-test.
(In reply to Karolin Seeger from comment #9) Pushed to both branches. Closing out bug report. Thanks!