Re: Using file type information from POSIX mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 15 November 2024 17:29:49 Ralph Boehme wrote:
> 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.

Well, I just wanted to point out that new SMB format is not compatible.
That is all and to make sure that it is visible for developers who are
going to implement it (as you were asking for Linux cifs.ko
implementation).

One of the reason (except the compatibility) why to use the existing
format is Solaris / illumos support, to allow implementing illumos SMB
client and illumos SMB server and transfer between illumos-illumos all
file types and mode informations.

> 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

Of course, but it is important to know about it. That is all.




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux