From: Ralph Boehme Date: Tue, 2 Oct 2018 12:51:05 +0000 (+0200) Subject: vfs_fruit: move setting ADEID_FINDERI length to ad_convert_xattr() X-Git-Tag: samba-4.8.8~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be2fa7aaa2ba06dfbf2cadf282df8aa649bfdab3;p=thirdparty%2Fsamba.git vfs_fruit: move setting ADEID_FINDERI length to ad_convert_xattr() ad_convert_xattr() does the conversion of the xattr data in the AppleDouble file, so we should update it's size there and should not defer it to the caller. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13649 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit d161e047710322491802d75f47598f96727cd004) --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 45937969d4e..493bd7511a4 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -1052,6 +1052,7 @@ static bool ad_convert_xattr(struct adouble *ad, fsp = NULL; } + ad_setentrylen(ad, ADEID_FINDERI, ADEDLEN_FINDERI); return true; } @@ -1096,7 +1097,6 @@ static int ad_convert(struct adouble *ad, ad_getentrylen(ad, ADEID_RFORK)); } - ad_setentrylen(ad, ADEID_FINDERI, ADEDLEN_FINDERI); ad_setentryoff(ad, ADEID_RFORK, ad_getentryoff(ad, ADEID_FINDERI) + ADEDLEN_FINDERI);