]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: move setting ADEID_FINDERI length to ad_convert_xattr()
authorRalph Boehme <slow@samba.org>
Tue, 2 Oct 2018 12:51:05 +0000 (14:51 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 18 Oct 2018 11:00:09 +0000 (13:00 +0200)
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit d161e047710322491802d75f47598f96727cd004)

source3/modules/vfs_fruit.c

index 45937969d4e1c71a5c5d5450b497611b792d917f..493bd7511a4c109ce3ba47e1518e2b1d24bd037e 100644 (file)
@@ -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);