[SMB3 POSIX] POSIX client creates a file, set the ARCHIVE bit or not

Ralph Boehme slow at samba.org
Mon Oct 30 15:03:29 UTC 2023


Hi!

I just stumpled over our old SMB1 UNIX extensions code dealing with file 
creation in POSIX context. There we have in open_file_ntcreate():

         if (new_dos_attributes & FILE_FLAG_POSIX_SEMANTICS) {
                 posix_open = True;
                 unx_mode = (mode_t)(new_dos_attributes & 
~FILE_FLAG_POSIX_SEMANTICS);
                 new_dos_attributes = 0;
         } else {
                 ...
                 new_dos_attributes |= FILE_ATTRIBUTE_ARCHIVE;
                 ...
         }

Why don't we set ARCHIVE for files created in POSIX context? Makes no 
sense to me.

A "pure" POSIX client wouldn't look at the DOS attributes at all, but 
this information might be useful to other clients and applications.

*scratches head*

Thanks!
-slow
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20231030/5a073aa3/OpenPGP_signature.sig>


More information about the samba-technical mailing list