On Fri Sep 30 12:06:00 2022 +0000, Joel Holdsworth wrote:
I'm not sure I quite follow what you mean. This is the full definition of the function:
static int fd_set_dos_attrib( int fd, ULONG attr ) { /* we only store the HIDDEN and SYSTEM attributes */ attr &= XATTR_ATTRIBS_MASK; if (attr != 0) { /* encode the attribures in Samba 3 ASCII format. Samba 4 has extended * this format with more features, but retains compatibility with the * earlier format. */ char data[11]; int len = sprintf( data, "0x%x", attr ); return xattr_fset( fd, SAMBA_XATTR_DOS_ATTRIB, data, len ); } else return xattr_fremove( fd, SAMBA_XATTR_DOS_ATTRIB ); }
If, after masking out everything except `HIDDEN` and `SYSTEM`, the value of `attr` is now zero, the attribute will be removed from the file.
@jhol Apparently I did not read closely enough, sorry about that.