vfs_fruit: remove resource fork special casing
authorRalph Boehme <slow@samba.org>
Mon, 15 Oct 2018 16:38:33 +0000 (18:38 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 31 Oct 2018 20:27:21 +0000 (21:27 +0100)
Directly unlinking a file with open handles is not good, don't do it.

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>
source3/modules/vfs_fruit.c

index 45dec2a3f57333043e0b820dbca6d973d62bd83b..d0ed0201ecbfb400406d1ca0278960388ec12195 100644 (file)
@@ -5736,10 +5736,6 @@ static int fruit_ftruncate_rsrc_xattr(struct vfs_handle_struct *handle,
                                      struct files_struct *fsp,
                                      off_t offset)
 {
-       if (offset == 0) {
-               return SMB_VFS_FREMOVEXATTR(fsp, AFPRESOURCE_EA_NETATALK);
-       }
-
 #ifdef HAVE_ATTROPEN
        return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset);
 #endif
@@ -5787,10 +5783,6 @@ static int fruit_ftruncate_rsrc_stream(struct vfs_handle_struct *handle,
                                       struct files_struct *fsp,
                                       off_t offset)
 {
-       if (offset == 0) {
-               return SMB_VFS_NEXT_UNLINK(handle, fsp->fsp_name);
-       }
-
        return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset);
 }