From b6ec190e7452dc8ec9f37ad509410b5832bc49cd Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 15 Sep 2014 13:53:22 +0200 Subject: vfs_fruit: update rfork size in AppleDouble header Update the AppleDouble entry with the new size when ftruncating a resource fork. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Reviewed-by: Volker Lendecke Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Sep 25 23:43:35 CEST 2014 on sn-devel-104 --- source3/modules/vfs_fruit.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 458904edc9..0441d5ebd4 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -2824,6 +2824,14 @@ static int fruit_ftruncate(struct vfs_handle_struct *handle, rc = SMB_VFS_NEXT_FTRUNCATE( handle, fsp, offset + ad_getentryoff(ad, ADEID_RFORK)); + if (rc != 0) { + return -1; + } + ad_setentrylen(ad, ADEID_RFORK, offset); + rc = ad_write(ad, NULL); + if (rc != 0) { + return -1; + } } break; default: -- cgit