]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: remove resource fork special casing
authorRalph Boehme <slow@samba.org>
Mon, 15 Oct 2018 16:38:33 +0000 (18:38 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 6 Nov 2018 08:10:25 +0000 (09:10 +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>
(cherry picked from commit a26032c3f68028b01fb6a7d38851409db1858161)

source3/modules/vfs_fruit.c

index 8660befd3d954c0ef695d2415afdb81334c31c99..e5b3897b6e4cc28520f223e79c18215bfb9ab52e 100644 (file)
@@ -5716,10 +5716,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
@@ -5767,10 +5763,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);
 }