diff options
author | Ralph Boehme <slow@samba.org> | 2018-10-05 19:15:04 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-10-18 13:00:10 +0200 |
commit | 1a67acfe25de8a2b0214d7fda05ec1d1ef3743c9 (patch) | |
tree | 641274c4de7faa5101cd204f090478da2fa70816 /source3 | |
parent | 5c79f7c1cea5e385c2441fb126776f01447a8a0f (diff) | |
download | samba-1a67acfe25de8a2b0214d7fda05ec1d1ef3743c9.tar.gz |
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit b948681b2bbaba202843858857fb9edbb543bdf2)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_fruit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index a77f365f5ae..d606be3742d 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; } |