summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-10-08 18:47:32 +0200
committerKarolin Seeger <kseeger@samba.org>2018-10-18 13:00:11 +0200
commita3ab52d3f482272adb83b5058dfb1b7dce9070b4 (patch)
tree06f32d5c1e8ec84a94d70d26298fce10458d6450 /source3/modules
parent024d123a4837fd64582c4c06796a20b4a70bd223 (diff)
downloadsamba-a3ab52d3f482272adb83b5058dfb1b7dce9070b4.tar.gz
vfs_fruit: make call to ad_convert_truncate() optional
Call ad_convert_truncate() based on whether the previous call ad_convert_xattr() returned converted_xattr=true. Upcoming fixes for a different Samba bug (#13642) will hook into calling ad_convert_truncate() in other cases, this also prepares for that. 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 9cf087a474bb2d7d29ca0daeaef412f6b545d0e0)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_fruit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index dd312da895b..26d75d61196 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -1305,9 +1305,11 @@ static int ad_convert(struct adouble *ad,
return -1;
}
- ok = ad_convert_truncate(ad, smb_fname);
- if (!ok) {
- return -1;
+ if (converted_xattr) {
+ ok = ad_convert_truncate(ad, smb_fname);
+ if (!ok) {
+ return -1;
+ }
}
ok = ad_convert_finderinfo(ad, smb_fname);