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)
committerRalph Boehme <slow@samba.org>
Wed, 10 Oct 2018 20:22:13 +0000 (22:22 +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>
source3/modules/vfs_fruit.c

index 057e4e4265b272ec5b4940aedc5f5265fd186a70..2dec90890064468a260258a5631067f75addf2b4 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);