Bug 13512 - Convert between fruit:resource=file and fruit:resource=xattr
Summary: Convert between fruit:resource=file and fruit:resource=xattr
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
Depends on:
Reported: 2018-07-06 20:11 UTC by Matthieu Pepin
Modified: 2018-10-05 10:20 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Pepin 2018-07-06 20:11:31 UTC
It would be nice to have a command-line tool to convert back and forth between fruit:resource=file and fruit:resource=xattr. Using two shares with different options for separate folders and making a copy of all files is not an option since there is too much data.

I have a lot of old type 1 fonts and they don't seem to work when fruit:resource=xattr is turned on, which makes me think Samba won't read the AppleDouble file at all with resource=xattr. Looking at the source code seems to confirm this.

The files were initially copied back when there was a spelling error in fruit:resource (with 2 s). By the time it was noticed a year later, it was too late and there were several terabytes of data using AppleDouble files instead of ZFS xattrs.
Comment 1 Ralph Böhme 2018-10-05 10:20:26 UTC
Oh yes, I would welcome patches that implement this and will happily review. It shoudln't be too difficult for someone with basic C skills. Take a look at source3/utils/mvxattr.c for an example of a tool that does something similar.

Please note that fruit:resource=xattr only really works on Solaris (and derivates) and on FreeBSD.