vfs_fruit: let fruit_pwrite_meta_stream also ftruncate empty FinderInfo
commit80c95670e21f08da555f2ee1bd236a5fb8aca7ac
authorRalph Boehme <slow@samba.org>
Sat, 20 Oct 2018 21:40:14 +0000 (20 23:40 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 6 Nov 2018 08:10:25 +0000 (6 09:10 +0100)
tree9b22134cff18a0e0df9d9f8dfc225b3c6673dd0d
parent248b5fc305b3b18ff82a9567234ba46ebe779f1f
vfs_fruit: let fruit_pwrite_meta_stream also ftruncate empty FinderInfo

fruit_streaminfo currently filters out the FinderInfo stream is
delete-on-close is set. We set it here internally, but the client may
also set it over SMB. Turns out that the macOS SMB server does NOT
filter out FinderInfo stream with delete-on-close set, so we must change
the way filtering is done in fruit_streaminfo.

Filtering is now done based on the FinderInfo stream being 0-bytes large which
is why I'm adding the ftruncate here.

No idea why the tests that check the filtering passed the commits
leading up to this one, but if you revert this commit after applying the
whole patchset, the "delete AFP_AfpInfo by writing all 0" test will fail.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13646

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 480695cd723cc4949e0b39ddb83560efac393412)
source3/modules/vfs_fruit.c