Hi Pali, On 11/15/24 3:46 PM, Pali Rohár wrote:
I would like to point out about one comment which I already discussed with Ralph privately. Mode as defined in that spec in section "2.1.1 posix mode" is _not_ compatible/same as the UNIX mode used by the Linux, BSD and other UNIX systems. The reason is that S_IFREG / S_IFDIR / S_IFLNK / S_IFCHR / S_IFBLK / S_IFIFO / S_IFSOCK constants does not match with the values defined in that SMB extension "2.1.1 posix mode".
it is not binary compatible and I still don't see a reason why we would wanna have that given the ugly smelling kitchen sink it is. We can't rely on that historic cruft, we MUST implement a sanitized version of this on the wire and then parse it into the format used by the OS we're running on.
When implementing the protocol you'll have to implement a fair bit of wire parsing anyway, so having something like these function which implement the parsing Samba doesn't seem to be a burden:
<https://git.samba.org/?p=samba.git;a=blob;f=libcli/smb/util.c;h=473b479a2abf60cb28ee4374b5d90cb6dda82213;hb=HEAD#l198> -slow
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature