From: Ralph Boehme Date: Fri, 5 Oct 2018 17:15:04 +0000 (+0200) Subject: vfs_fruit: use ADEDOFF_RFORK_DOT_UND offset macro in ad_convert_truncate() X-Git-Tag: tdb-1.3.17~1352 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b948681b2bbaba202843858857fb9edbb543bdf2;p=thirdparty%2Fsamba.git vfs_fruit: use ADEDOFF_RFORK_DOT_UND offset macro in ad_convert_truncate() We really want the fixed size offset here, not a calculated one. Note that "ad_getentryoff(ad, ADEID_RFORK)" is equal to ADEDOFF_RFORK_DOT_UND in this case. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13649 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 41476625b33..02db5923c6a 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -1161,8 +1161,8 @@ static bool ad_convert_truncate(struct adouble *ad, * FIXME: direct ftruncate(), but we don't have a fsp for the * VFS call */ - rc = ftruncate(ad->ad_fd, ad_getentryoff(ad, ADEID_RFORK) - + ad_getentrylen(ad, ADEID_RFORK)); + rc = ftruncate(ad->ad_fd, ADEDOFF_RFORK_DOT_UND + + ad_getentrylen(ad, ADEID_RFORK)); if (rc != 0) { return false; }