1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

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)
This commit is contained in:
Ralph Boehme 2018-10-08 18:47:32 +02:00 committed by Karolin Seeger
parent 024d123a48
commit a3ab52d3f4

View File

@ -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);