From: "Pali Rohár" <pali@kernel.org>
To: Ralph Boehme <slow@samba.org>
Cc: CIFS <linux-cifs@vger.kernel.org>,
Steven French <Steven.French@microsoft.com>,
Paulo Alcantara <pc@manguebit.com>,
paalcant@redhat.com
Subject: Re: Using file type information from POSIX mode
Date: Fri, 15 Nov 2024 17:40:56 +0100 [thread overview]
Message-ID: <20241115164056.tlowict7cmpo6uva@pali> (raw)
In-Reply-To: <8663f904-36b0-4f7a-baf8-576c85b7cbd2@samba.org>
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.
prev parent reply other threads:[~2024-11-15 16:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7ef51654-5fa7-4333-8922-40bae24b18bc@samba.org>
2024-11-12 9:30 ` Fwd: Using file type information from POSIX mode Ralph Boehme
2024-11-15 14:46 ` Pali Rohár
2024-11-15 16:29 ` Ralph Boehme
2024-11-15 16:40 ` Pali Rohár [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241115164056.tlowict7cmpo6uva@pali \
--to=pali@kernel.org \
--cc=Steven.French@microsoft.com \
--cc=linux-cifs@vger.kernel.org \
--cc=paalcant@redhat.com \
--cc=pc@manguebit.com \
--cc=slow@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox