summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-10-09 10:15:37 +0200
committerKarolin Seeger <kseeger@samba.org>2018-10-18 17:37:52 +0200
commit066d0ee3c9ab97ac263e4c1b88d02ac0e9f339d6 (patch)
tree21d14dd54bc7a953f781eca9c0e3b634d7e159e5 /source3/modules
parenta3ab52d3f482272adb83b5058dfb1b7dce9070b4 (diff)
downloadsamba-066d0ee3c9ab97ac263e4c1b88d02ac0e9f339d6.tar.gz
vfs_fruit: move check in ad_convert() to ad_convert_*() subfunctions
Currently the whole conversion is skipped if the FinderInfo entry in the AppleDouble file is of the default size (ie not containing xattrs). That also means we never converted FinderInfo from the AppleDouble file to stream format. This change finally fixes this. Note that this keeps failing with streams_depot, much like the existing known-fail of "samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion". Fixing the conversion to work with vfs_streams_depot is a task for another day. 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> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Thu Oct 11 01:30:13 CEST 2018 on sn-devel-144 (cherry picked from commit 31daab88e6a415e72ead69844e3eccf5dc02e53c) Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-8-test): Thu Oct 18 17:37:52 CEST 2018 on sn-devel-144
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_fruit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 26d75d61196..200ef4a99f5 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -1010,6 +1010,10 @@ static bool ad_convert_xattr(struct adouble *ad,
*converted_xattr = false;
+ if (ad_getentrylen(ad, ADEID_FINDERI) == ADEDLEN_FINDERI) {
+ return true;
+ }
+
if (ad->adx_header.adx_num_attrs == 0) {
return true;
}
@@ -1296,10 +1300,6 @@ static int ad_convert(struct adouble *ad,
bool ok;
bool converted_xattr = false;
- if (ad_getentrylen(ad, ADEID_FINDERI) == ADEDLEN_FINDERI) {
- return 0;
- }
-
ok = ad_convert_xattr(ad, smb_fname, &converted_xattr);
if (!ok) {
return -1;