diff options
author | Volker Lendecke <vl@samba.org> | 2018-08-07 15:10:31 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2018-09-05 13:35:28 +0200 |
commit | 17ed5e06c7fe1085067e7bff8066f91aabbf2855 (patch) | |
tree | 26db185093b95b7ca8c4e4e198567cfc29c09592 | |
parent | 3d8fdc38453adb7a323b342c40226686bc9f3b41 (diff) | |
download | samba-17ed5e06c7fe1085067e7bff8066f91aabbf2855.tar.gz |
vfs_fruit: Don't unlink the main file
The original fix for bug 13441 was missing a check that verifies that
fruit_ftruncate() is actually called on a stream.
Follow-up to
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13441
Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Aug 23 15:28:48 CEST 2018 on sn-devel-144
(cherry picked from commit 8c14234871820eacde46670d722a676fb5f3a46c)
-rw-r--r-- | selftest/knownfail.d/samba3.vfs.fruit | 1 | ||||
-rw-r--r-- | source3/modules/vfs_fruit.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/selftest/knownfail.d/samba3.vfs.fruit b/selftest/knownfail.d/samba3.vfs.fruit index d858452eb52..8df25bccb79 100644 --- a/selftest/knownfail.d/samba3.vfs.fruit +++ b/selftest/knownfail.d/samba3.vfs.fruit @@ -1,2 +1 @@ ^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion\(nt4_dc\) -^samba3.vfs.fruit .*.setinfo eof stream\(nt4_dc\) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 684fcd664f6..f3e687184f6 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -5514,7 +5514,11 @@ static int fruit_ftruncate(struct vfs_handle_struct *handle, (intmax_t)offset); if (fio == NULL) { - if (offset == 0 && global_fruit_config.nego_aapl) { + if (offset == 0 && + global_fruit_config.nego_aapl && + is_ntfs_stream_smb_fname(fsp->fsp_name) && + !is_ntfs_default_stream_smb_fname(fsp->fsp_name)) + { return SMB_VFS_NEXT_UNLINK(handle, fsp->fsp_name); } return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset); |