This patch set is based upon patches from Wine Staging, and implements support for the
READONLY DOS file attributes. These have been implemented in various ways depending upon the capabilities of the operating system and the file system.
FAT MSDOS file attributes
On Linux, the FAT filesystem implementation allows DOS file attributes to be applied to files and queried through a family of ioctls. Note that these ioctls are not yet supported by the NTFS or CIFS drivers.
Extended File Attributes
Modern filesystems generally support Extended File Attributes - auxiliary blobs of binary data that can be attached to a file. Samba uses the
user.DOSATTRIB attribute to store DOS attribute information in the form of a hexadecimal value.
Note that although FreeBSD and NetBSD support the extended attribute system calls, these are not currently implemented in the operating system, or supported in any of their filesystem drivers.
BSD File Flags
On some BSD-like operating systems including MacOS, FreeBSD and NetBSD, the
struct stat structure contains the
st_flags member can carry flags of which the following can be used to represent DOS attributes:
FILE_ATTRIBUTE_HIDDEN(not available on NetBSD)
The implementation is takes a permissive approach. It will attempt to store flags by any of the above mentioned methods, and will retrieve flags using any available method and will combine flags from multiple sources together.